User:PerfektesChaos/js/userspaceLinks/r.js

/// mw:User:PerfektesChaos/js/userspaceLinks/r.js /// 2018-08-24 PerfektesChaos@de.wikipedia /// Fingerprint:#0#FD26F76E# /// @license GPL [//www.mediawiki.org/w/COPYING](+GFDL,LGPL,CC-BY-SA) /// (function(mw,$){ "use strict"; var Version=1.3,Sign="userspaceLinks",URSLI; if(typeof mw.libs[Sign]!=="object"||!mw.libs[Sign]){ mw.libs[Sign]={};} URSLI=mw.libs[Sign]; URSLI.vsn=Version; URSLI.doc="mw:User:PerfektesChaos/js/userspaceLinks"; URSLI.type=Sign; URSLI.signature="ext.gadget."+URSLI.type; URSLI.texts={ "global":{"en":"meta:/global.*"}, "globals":{"en":"meta:/global.* (CSS, JS) of this user", "de":"meta:/global.* (CSS, JS) dieses Benutzers"}, "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" }; function feature(apply){ var e,r,s; if(!URSLI.slang){ s=mw.config.get("wgUserLanguage").toLowerCase; s=URSLI.trans[s]; URSLI.slang=(s?s:"en");} e=URSLI.texts[apply]; if(e){ r=e[URSLI.slang]; if(!r){ r=e.en; if(!r){ r="???"+apply+"???";}} }else{ r="***"+apply+"***";} return r;} function fiat{ var script=mw.config.get("wgScript"),subpages=script+"?namespace=2&title=Special:Prefixindex/"+mw.util.wikiUrlencode(URSLI.scope),local=false; mw.util.addPortletLink("p-tb",subpages,feature("subpage"),"t-subpages",feature("subpages"),"g",null); if(typeof URSLI.local==="boolean"){ local=URSLI.local;} if(!local){ subpages="//meta.wikimedia.org"+script+"?namespace=2&title=Special:Prefixindex/"+mw.util.wikiUrlencode(URSLI.scope)+"/global."; mw.util.addPortletLink("p-tb",subpages,feature("global"),"t-global",feature("globals"),null,null);}} function fire{ var i,rls,scope; if(mw.loader.getState(URSLI.signature)!=="ready"){ rls={}; rls[URSLI.signature]="ready"; mw.loader.state(rls); URSLI.nsN=mw.config.get("wgNamespaceNumber"); switch(URSLI.nsN){ case-1: scope=mw.config.get("wgRelevantUserName"); if(scope){ URSLI.scope="User:"+scope;} break; case 2: case 3: URSLI.scope=mw.config.get("wgTitle"); i=URSLI.scope.indexOf("/"); if(i>1){ URSLI.scope=URSLI.scope.substr(0,i-1);} break;} if(URSLI.scope){ mw.loader.using(["user","mediawiki.util"],function{ $(fiat); });}}} fire; }(window.mediaWiki,window.jQuery)); /// EOF userspaceLinks/r.js