Jump to content

User:JPxG/refill-menu.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.
// Adds context menu to fill in references with ReFill.
addOnloadHook(function() {
		// var title = window.location.href.replaceAll("https://en.wikipedia.org/wiki/","").replaceAll("https://en.wikipedia.org/w/index.php?title=","");
		var title = document.title.replaceAll(" - Wikipedia","");
		// var linkstring = "https://refill.toolforge.org/?page=" + title + "&wiki=en";
		var linkstring = "https://refill.toolforge.org/ng/result.php?page=" + title + "&wiki=en&method-wiki=Fix%20page&addblankmetadata=on&noaccessdate=on"
		mw.util.addPortletLink("p-cactions", linkstring, "ReFill", "ca-ReFill", "Fill references with ReFill", "");
}); // onloadhook
// </nowiki>