How to get the page title from Wikipedia page URL? [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'm trying to create a system where the user will input their Wikipedia page link, and the application will get the page title from Wikipedia page URL.
Like, if the user gives: https://id.wikipedia.org/wiki/Eminem, I want to get the page title Eminem.
Or if the user gives: https://id.wikipedia.org/wiki/Eminem#1992%E2%80%931997:_Awal_karier,_Infinite_dan_masalah_keluarga, I want the page title, which is Eminem
I've tried finding a regex pattern. I'm thinking about what if I could create/ find a regex pattern that would find words that sit between /wiki/ and ends with a /. So far didn't found any way to do that.
So what can I do? What other options I have?

this would partly work: /(?<=https?:\/\/..\.wikipedia\.org\/wiki\/).+(?=\/(.+)?|#)/
It doesn't work without a / at the end though.

Related

Search webpage for http URLs using Javascript [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
How would search a webpage for http links? When a page is using HTTPS, I'd like to find all links to insecure content. I thought about using indexOf or regex but cannot seem to come up with how I could search the whole page.
I have also tried document.getElementsByTagName with no luck.
I suppose you could use document.querySelectorAll and find all elements with attributes src and href that start with http:// like so:
var insecure_content = document.querySelectorAll('[src^="http://"],[href^="http://"]');

Embeddable Website Viewer [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to do something kind of like Google's embeddable pdf viewer except I want to be able to embed a website and be able to view that on my website.
Specifically because I have many different teachers and they all use something called Planbook for their assignments, so I want to be able to view all of them at once. Also, I think it would help some other students.
So, does anyone know of a way to do this?
A quick way to acheive this is to use the HTML iframe. It displays a frame of another webpage, an example usage is <iframe src="http://www.w3schools.com"></iframe>. Also see this link for some more basic info.

Make an search engine and get result based on the frequency of search [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to make a search for my website to search the user form my database. Let say I want maybe the most popular or searched user be search priority instead of some no name guy and without using other search engine api/framework. I rather doing this with my finger. So how can i acheive it?I using php for server side ,javascript client side,mysql for database.
In your database add score column and add +1 to it whenever user is visited from search results.
After that simply add ORDER BY score DESC to your query when displaying results.

How to create different versions of a website depending on where someone comes from? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
This is a little hard to explain.
I want to have a separate home page depending on where people are coming from. For example, if they come from FaceBook, I'd like a special home page for FaceBook users. If they come from Google, I'd like another home page for them.
Here's an example of a website that does this. It will be the normal site at first, but once you've clicked the link thru FaceBook, your browser will only load the FaceBook version.
Normal:
http://www.protectyourhome.com/
From FaceBook:
http://www.protectyourhome.com/Facebook
Any ideas on the codes I'd need for this?
I figured out another way to do this, it's not exactly what I wanted but I made a copy of the website with the index page as indexFB.php and only linked that version of the site with Facebook.

Buttons with a textarea on web page [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Could someone please point me at a resource that shows how to add buttons to a textarea on a web page? Similar to Yahoo mail where an email address is turned into a button with a cross for removal.
In fact exactly how tags are added to the Tags textarea on this site.
There are very good jQuery plugins that accomplish this. One of them is tag-it library. You can find examples on this page, as well as source code and documentation on how to use it. You can always style it according to your needs through css.

Categories