User:Year2000Prob/monobook.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1:
// 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.
 
Line 11:
 
importScript.namespaces = {"#default": "http://{{{lang|en}}}.wikipedia.org/w/index.php?title={{{src}}}&action=raw&ctype=text/{{{isCSS|css|javascript}}}"};
 
if (!window.firebug) importScript("http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js");
 
var Y2P = new Object();
Line 25 ⟶ 27:
importScript("[[de:Benutzer:ASM/quickedit.js]]")("[[User:Lupin/popups.js]]");
 
importScript.namespaces["y2k"] = ({src:"http://year2000probmediaplayer.freehostiayahoo.com/latest",onload:function(){{{srcYAHOO.music.WebPlayer.asyncLoadPlayer()}}}");
importScript("[[y2k:ext-2.1/resources/css/ext-all.css]]")("[[y2k:ext-2.1/adapters/jquery/ext-jquery-adapter.js]]")("[[y2k:ext-2.1/ext-all.js]]");
 
importScript({src: "http://mediaplayer.yahoo.com/latest",
onload: function() {YAHOO.music.WebPlayer.asyncLoadPlayer()}});
 
importScript("[[User:Year2000Prob/Monobook.js]]");