User:Stuartyeates/common.js

/* function retitle { var a = $("#bodyContent").text; var wCount = a.split(" ").length; var $wordOutput = $(" Word Count: " + wCount + " ").css("font-size", "small"); $( "#bodyContent" ).prepend($wordOutput);

} //retitle;

/*	Adds a toolbox link to do a copyvio check on the current page.

Install by adding: importScript('User:The Earwig/copyvios.js'); // User:The Earwig/copyvios.js to your Special:MyPage/common.js. //importScript('User:The Earwig/copyvios.js');

/* Adds a link in 'more' to do a copyvio check on the given page. Copy of User:The Earwig/copyvios.js, but with a different link location (in the same place as other NPP scripts), and opens in a new tab rather than the current window */ /* mw.loader.using("mediawiki.util", function {   mw.util.addPortletLink( "p-cactions", "https://tools.wmflabs.org/copyvios/?lang=" + mw.config.get("wgContentLanguage") + "&project=" + mw.config.get("wgSiteName").toLowerCase + "&title=" + encodeURIComponent(mw.config.get("wgPageName")), "Copyvio check", "t-copyvio-check", "Check this page for copyright violations" ); }); $("#t-copyvio-check > a").attr("target", "_blank"); mw.loader.load( '/w/index.php?title=User:Evad37/rater.js&action=raw&ctype=text/javascript' ); // Backlink: User:Evad37/rater.js