User:Year2000Prob/monobook.js: Difference between revisions

Content deleted Content added
mNo edit summary
No edit summary
Line 2:
window.importScript = function(src) {
var self = arguments.callee;
if (!self.imported) self.imported = [];
if (arguments.length == 0 || typeof src == "integer") {
var imported = self.imported;
delete self.imported.length = 0;
return imported[src] || imported;
};
if (!self.imported) self.imported = [];
var format = function(wscript, src) {
var lang, source = src;
Line 45:
// End importScript function. Copy below this line at your own risk.
 
var MWVersion = (function(z) {
var whichsite = ({ // define whichsite (string: "wp" if on Wikipedia, "hrw" if on HRWiki; "hrfw" if on HRFWiki)
var a = z.match(/([0-9])\.([0-9]*)/);
var b = a[2];
if (b.length == 1) b = "0" + b;
return Number(a[1] + "." + b);
var})(wgVersion), whichsite = ({ // define whichsite (string: "wp" if on Wikipedia, "hrw" if on HRWiki; "hrfw" if on HRFWiki)
"http://en.wikipedia.org": "wp",
"http://www.hrwiki.org": "hrw",
"http://fanstuff.hrwiki.org": "hrfw",
"http://wuw.clamburger.org": "wuw"
})[wgServer] || wgServer"null";
 
importScript.namespaces = {"#default": "http://{{{lang|en}}}.wikipedia.org/w/index.php?title={{{src}}}&action=raw&ctype=text/javascript"};
Line 115 ⟶ 120:
};
 
// The followingclick codeevent is made obsolete by theMediaWiki more1.14 recentand versions of MediaWikihigher
// $(".portlet:not(#p-personal, #p-cactions) h5").css("cursor", "default").click(function() {
// if (MWVersion < 1.14) $(this).parent().find("div.pBody").slideToggle("slow");
// }).parent().find("div.pBody").css("border-left", "none").hide();
if (/^Special\:(Recent[Cc]hanges|Watchlist)$/.test(wgPageName)) {