User:V111P/js/WebRef: Difference between revisions

Content deleted Content added
m top: minor clarifications
Added expanded instructions for setting up the bookmarklet and troubleshooting suggestions.
Line 23:
* In Google Chrome and Opera (Windows and Linux) - press Ctrl+D and then the button Edit (for Chrome) or Properties (for Opera), and change the name and address as for the other browsers.
* In Google Chrome (Mac) – press Cmd-D then the button More, and change the name and address as for the other browsers.
 
There is a second set of instructions further below if you have problems with these.
 
== Quotation ==
Line 40 ⟶ 42:
 
The caveat is that these words, after ^^, can be [[regular expression]]s. What that means is to use the characters '''\ . ? * + | ^ $ ( ) [ ] { }''' you need to prepend them with <code>\</code>. Otherwise they have special meanings. A period for examples means "any one character". An example: we want to remove everything after the first period: <code>span.byline-name^^^^\.</code> - here we use <code>\</code> to escape the special-character meaning of the period.
 
== How to create the bookmarklet -- super easy instructions! ==
 
This is actually super easy to set up. I do computer support for friends and family, so let's first ditch all the jargon. This is what you need to do:
* In your '''second favorite browser''', the one you don't use a lot for editing Wikipedia, go to https://en.wikipedia.org/wiki/User:V111P/js/WebRef
* In your '''favorite browser''' open any web page that you ''haven't'' bookmarked yet. Make a bookmark -- I put mine on the Bookmarks bar for easy access.
* Right-click the new bookmark and in FireFox go to Properties, in Chrome or Opera to Edit. You'll see that the first line is headed Name and contains the name of the webpage you just bookmarked. Replace the name of the webpage with whatever makes sense to you, I called my bookmark ''Wiki WebRef''.
* The second line is called Location or URL, depending on your browser. Delete the URL that is in it so that you have a blank line. Go to your other browser and copy '''the entire text in the green box'''. Then go back to your main browser and paste this into the Location or URL line of the bookmark. It will look like it won't fit, but it does.
* Hit Save and you are done!
 
To use WebRef, click on the WebRef bookmark when you are on the page you want to cite. The special WebRef bookmark doesn't take you to another page, it runs the JavaScript in the bookmark and opens a text box with the Cite Web template.
 
If WebRef doesn't include the author's name, click on the 'Authors' button and enter the name(s) just as they appear on the webpage. "Jane Doe" will be converted automatically to "last = Doe | first = Jane."
 
Make sure to check the dates because WebRef doesn't always pick up the correct publication date, even when it is shown on the webpage.
 
Thank you '''V111P''' for giving us such an easy to use way for creating references! If anyone still has problems setting this up I'd be happy to help.
 
-- [[User:Peter NYC|Peter NYC]] ([[User talk:Peter NYC|talk]]) 01:50, 25 May 2019 (UTC)
 
== Troubleshooting ==
 
[[File:WebRef citation tool.png|thumb|A text box with the Cite Web template is displayed on top of the page after activating the bookmarklet.]]If you have problems getting WebRef to work, first go to a site that is known to be easy to use with WebRef, the New York Times https://www.nytimes.com. Click on a news article on the main page, and then click on your WebRef bookmark.
 
If the textbox does not pop up:
 
* Make sure that you are not blocking JavaScript in your browser settings.
* If you use JavaScript blocking browser extensions such as [[NoScript]] or ''ScriptSafe'' turn them off temporarily and '''reload the page'''.
* Ad blockers such as [[Adblock]], [[Adblock Plus]] or [[uBlock Origin]] could be blocking JavaScript, so you may have to turn them off temporarily and '''reload the page'''.
* Pause the [[Ghostery]] browser extension if you use it, because it is known to interfere, and then '''reload the page'''.
 
Sometimes you need to reload the webpage '''twice''' after turning off extensions. Good luck!
 
-- [[User:Peter NYC|Peter NYC]] ([[User talk:Peter NYC|talk]]) 01:50, 25 May 2019 (UTC)
 
== See also ==