User:Year2000Prob/monobook.js

This is an old revision of this page, as edited by Year2000Prob (talk | contribs) at 09:43, 11 August 2008. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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 function. Feel free to copy this into [[Special:Mypage/monobook.js|your own Monobook js]].
window.importScript=function(e){var f=arguments.callee;function g(b,c,d){return b.replace(/\{{3}lang\|([a-z]{2})\}{3}/i,c.indexOf(":")==2?c.substring(0,2):"$1").replace(/\{{3}iscss\|([^\|]*)\|([^\}]*)\}{3}/gi,function(a){return(d?a[1]:a[2]).replace("{{!}}","|")}).replace("{{{src}}}",c.indexOf(":")==2?c.substring(3,c.length):c)};if(!f.imported)f.imported={};var h;if(typeof e=="object"){h=e;e=h.src;delete h.src};if(f.imported[e])return f;var i=h?h.isCSS:(e.indexOf(".css")!=-1),j=document.createElement(i?"link":"script");if(i)j.setAttribute("rel","stylesheet");j.setAttribute("type","text/"+(i?"css":"javascript"));if(f.namespaces&&/^\[{2}([^\[\]\|\<\>\n]*)([^\[\]\<\>\n]*?)?\]{2}$/.test(e))j.setAttribute((i?"href":"src"),(function(){var a=e.substring(2,e.length-2),b=g(f.namespaces["#default"],a,i);for(var c in f.namespaces){if(a.indexOf(c+":")==0){a=a.substring(c.length+1);b=g(f.namespaces[c],a,i);break}};return b})());else j.setAttribute((i?"href":"src"),encodeURI(e));if(h){if(typeof h.onload=="function"&&!i){if(j.addEventListener)j.addEventListener("load",h.onload,true);else j.onreadystatechange=function(){if(this.readyState=="complete"||this.readyState==4)h.onload.apply(this,arguments)};delete h.onload};for(var k in h)j.setAttribute(k,h[k])};f.imported[e]=document.getElementsByTagName("head")[0].appendChild(j);return f};
// End importScript function. Copy below this line at your own risk.

var whichsite; // define whichsite (string: "wp" if on Wikipedia, "hrw" if on HRWiki; "hrfw" if on HRFWiki)
switch (wgServer) {
  case "http://en.wikipedia.org":whichsite="wp";break;
  case "http://www.hrwiki.org":whichsite="hrw";break;
  case "http://fanstuff.hrwiki.org":whichsite="hrfw";break;
};

importScript.namespaces = {"#default": "http://{{{lang|en}}}.wikipedia.org/w/index.php?title={{{src}}}&action=raw&ctype=text/{{{isCSS|css|javascript}}}"};

var Y2P = new Object();
importScript("[[User:Year2000Prob/Y2P.MediaWiki.js]]")("http://code.jquery.com/jquery-latest.pack.js");

var wikEdUsing = "(using [[" + (whichsite != "wp" ? "wikipedia:" : "") + "User:Cacycle/wikEd|wikEd]])",
    wikEdShowUsingButton = true,
    wikEdSummaryUsing = "(using [[" + (whichsite != "wp" ? "wikipedia:" : "") + "User:Cacycle/wikEd|wikEd]])",
    wikEdFullScreenModePreset = true,
    wikEdCloseToolbarPreset = true,
    wikEdButtonsOnTop = false;
importScript("[[User:Cacycle/diff.js]]")("[[User:Pilaf/livepreview.js]]")("[[User:Cacycle/RegExTypoFix.js]]")("[[User:Cacycle/wikEd.js]]");

importScript("[[de:Benutzer:ASM/quickedit.js]]")("[[User:Lupin/popups.js]]");

importScript({src:"http://mediaplayer.yahoo.com/latest",onload:function(){YAHOO.music.WebPlayer.asyncLoadPlayer()}});

importScript("[[User:Year2000Prob/Monobook.js]]");