Jump to content

User:Zziccardi/common.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.
importScript("User:Cameltrader/Advisor.js");               // [[User:Cameltrader/Advisor]]
importScript('User:Lenore/autolink.js');                   // [[User:Lenore/autolink]]
importScript("User:Ohconfucius/script/MOSNUM dates.js");   // [[User:Ohconfucius/script/MOSNUM dates]]
importScript("User:PleaseStand/userinfo.js");              // [[User:PleaseStand/User info]]
importScript("User:Theopolisme/Scripts/ajaxWatchlist.js"); // [[User:Theopolisme/Scripts/ajaxWatchlist]]
importScript("User:Ucucha/duplinks.js");                   // [[User:Ucucha/duplinks]]
importScript("Wikipedia:AutoEd/complete.js");              // [[Wikipedia:AutoEd]]

mw.loader.load("https://meta.wikimedia.org/w/index.php?title=User:Zhaofeng_Li/Reflinks.js&action=raw&ctype=text/javascript");  // [[User:Zhaofeng Li/reFill]]
mw.loader.load("//meta.wikimedia.org/w/index.php?title=User:Hedonil/XTools/XTools.js&action=raw&ctype=text/javascript");       // [[m:User:Hedonil/XTools]]
mw.loader.load("//en.wikipedia.org/w/index.php?title=User:PleaseStand/userScriptSandbox.js&action=raw&ctype=text/javascript"); // [[Wikipedia:User script sandbox]]

// [[User:Js/ajaxPreview]]
// Add classes to the preview and diff buttons created by ajaxPreview.js so that
// their styling matches the surrounding buttons.
mw.loader
	.getScript("//en.wikipedia.org/w/index.php?title=User:Js/ajaxPreview.js&action=raw&ctype=text/javascript")
	.then(function () {
		["wpPreviewLive", "wpDiffLive"].forEach(function (id) {
			document.getElementById(id).classList.add("oo-ui-inputWidget-input", "oo-ui-buttonElement-button");
		});
	});

// ajaxPreview customization is below.
var ajaxPreviewPos       = "bottom";       // This places the ajaxPreview buttons on the bottom and replaces the default buttons.
var ajaxPreviewButton    = "Show preview"; // This alters the "Preview" button text.
var ajaxDiffButton       = "Show changes"; // This alters the "Changes" button text.
var ajaxPreviewScrollTop = true;           // This scrolls to the top of the page every time the "Preview" button or "Changes" button is clicked.

// ajaxWatchlist customization is below.
window.watchlistUpdateFrequency = 60000;

// AutoEd customization is below.
autoEdMinor        = true;
autoEdClick        = true;
autoEdTag          = "Cleaned up using [[WP:AutoEd|AutoEd]]";
autoEdLinkHover    = "Run AutoEd";
autoEdLinkName     = "AutoEd";
autoEdLinkLocation = "p-tb";

// autolink customization is below.
var autolinkParseLink = false;