User:PerfektesChaos/js/userspaceLinks/r.js

/// userspaceLinks/r.js /// 2013-02-01 PerfektesChaos@de.wikipedia /// Fingerprint:#0#4D85D497# /// @license GPL [//www.mediawiki.org/w/COPYING](+GFDL,LGPL,CC-BY-SA) /// (function(mw,$){ "use strict"; var URSLI; if(typeof mw.libs.userspaceLinks||!mw.libs.userspaceLinks){ mw.libs.userspaceLinks={};} URSLI=mw.libs.userspaceLinks; URSLI.doc="mw:User:PerfektesChaos/js/userspaceLinks"; URSLI.type="userspaceLinks"; URSLI.vsn=1.0; URSLI.texts={ "subpage":{"en":"Subpages","de":"Unterseiten"},"subpages":{"en":"All subpages of this user below this page","de":"Alle Benutzer-Unterseiten dieser Seite"} }; URSLI.trans={ "de":"de","de-at":"de","de-ch":"de","de-formal":"de","als":"de","bar":"de","dsb":"de","frr":"de","gsw":"de","hsb":"de","ksh":"de","lb":"de","nds":"de","pdc":"de","pdt":"de","pfl":"de","sli":"de","stq":"de","vmf":"de" }; URSLI.feature=function(apply){ var e,r,s; if(!this.slang){ s=mw.config.get("wgUserLanguage").toLowerCase; s=this.trans[s]; this.slang=(s?s:"en");} e=this.texts[apply]; if(e){ r=e[this.slang]; if(!r){ r=e.en; if(!r){ r="???"+apply+"???";}} }else{ r="***"+apply+"***";} return r; }; URSLI.fiat=function{ var script=mw.config.get("wgScript"),subpages=script+"?namespace=2&title=Special:Prefixindex/"+mw.util.wikiUrlencode(URSLI.scope); mw.util.addPortletLink("p-tb",subpages,URSLI.feature("subpage"),"g",URSLI.feature("subpages"),null); }; URSLI.fire=function{ var spec,launch=false; URSLI.nsN=mw.config.get("wgNamespaceNumber"); switch(URSLI.nsN){ case-1: spec=mw.config.get("wgCanonicalSpecialPageName"); launch=("|Contributions|Listfiles|".indexOf(spec)>0); break; case 2: case 3: launch=true; break;} if(launch){ mw.loader.using(["user","mediawiki.util"],this.first);} }; URSLI.first=function{ var i,launch=true; URSLI.scope=mw.config.get("wgTitle"); if(URSLI.nsN===-1){ i=URSLI.scope.indexOf("/"); launch=(i>1); if(launch){ URSLI.scope=URSLI.scope.substr(i+1);}} if(launch){ $(document).ready(URSLI.fiat);} }; if(!URSLI.loaded){ URSLI.loaded=true; URSLI.fire;} mw.loader.state("ext.gadget.userspaceLinks","ready"); }(mediaWiki,jQuery)); /// EOF userspaceLinks/r.js