User:V111P/js/WebRef

This is an old revision of this page, as edited by V111P (talk | contribs) at 06:28, 22 April 2014 (more info). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

WebRef is a script automating the filling of the {{cite web}} template. You run the script on the page you want to cite. A form will be displayed on top of that page with a text box containing the prefilled cite template. But for the script to be able to fill all the information (including the name of the author and the date of the article) on most sites you need to do a little work first - press the Site setup button and follow the instructions (and tell me if you don't understand them!).

The script can be used as a bookmarklet with the following address:

javascript:(function(){var d=document,s=d.createElement('script');s.src='//en.wikipedia.org/w/index.php?title=User:V111P/js/webRef.js&action=raw&ctype=text/javascript&smaxage=43200&maxage=86400';d.body.appendChild(s);})();

To test the script, you can just execute its source code in your browser's JavaScript console. Make sure you are on a page with (only one) article on it, for example on a news site.

You can edit this page. If I don't like or understand something you wrote, I will correct it. ;)

How to create a bookmarklet

It depends on your browser.

  • In Firefox on any any bookmark in the bookmark menu. Select New Bookmark, enter a name (for example WebRef) in the Name field, enter the JavaScript given above in the address field (Location).
  • In Internet Explorer you can create a bookmark of any page in the usual manner (Add to favorites), then right-click it in the favorites menu, choose Properties, enter the JavaScript given above in the URL field, change the name (in the General section) to WebRef.
  • In Google Chrome and Opera - press Ctrl+D and then the button Edit (for Chrome) or Properties (for Opera), change the name and address as for the other browsers.

See also