User:RossPatterson/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* [[User:Dispenser/Link checker]] Toolbox entry
 * Adds a entry in the Toolbox that will check the external links of the page in the Monobook skin
 * 
 * == Installing ==
 * Copy the line below and paste it into the bottom of your monobook.js file ([[Special:Mypage/monobook.js]])
 
        importScript('User:Dispenser/Link checker/toolbox.js');
 
 * Save the page and CTRL-SHIFT-F5 (Refresh)
 */

importScript('User:Dispenser/Link checker/toolbox.js');

/* From [[User:Lunchboxhero/monobook.js]] */
// This code will change ISBN links to point to the url of your choice,
// instead of Special:Booksources. 
//
// The current magicURL includes Wikimedia's Amazon Referral reference. That means if you click on 
// the ISBN link, go to Amazon and end up buying the book, Wikimedia will earn some small amount
// of money from that sale.  If you don't want to support Wikimedia in this way, but do want ISBNs
// to link to Amazon, replace the current magicURL with "http://www.amazon.com/gp/search?ie=UTF8&field-isbn=MAGICNUMBER"
 
var magicURL = "http://www.amazon.com/gp/search?ie=UTF8&field-isbn=MAGICNUMBER&tag=wikipedia08-20";
importScript('User:Lunchboxhero/externISBN.js');

/* Add a tab called "de-iso8601" to convert yyyy-mm-dd dates to mmm dd, yyyy */
importScript("User:RossPatterson/ISO8601_to_mmm_dd_yyyy.js");

/* Add a tab called "RefReorg" to reorganize references */
importScript("User:RossPatterson/Reorganize_References.js");

/* From User:Dispenser/Reflinks */
// Add [[WP:Reflinks]] launcher in the toolbox on left
addOnloadHook(function () {
 mw.util.addPortletLink(
  "p-tb",     // toolbox portlet
  "http://toolserver.org/~dispenser/cgi-bin/webreflinks.py/" + wgPageName
   + "?client=script&citeweb=on&overwrite=&limit=20&lang=" + wgContentLanguage,
  "Reflinks"  // link label
)});