Jump to content

User:PerfektesChaos/js/idResolver/prego/r.js

From Wikipedia, the free encyclopedia
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.
/// User:PerfektesChaos/js/idResolver/prego/r.js
/// 2018-08-24 PerfektesChaos@de.wikipedia
/// Fingerprint:#0#189920E7#
/// @license GPL [//www.mediawiki.org/w/COPYING](+GFDL,LGPL,CC-BY-SA)
///<nowiki>
(function(mw){
"use strict";
var Version=1.2,IDA="idResolver",Sub="prego";
if(typeof mw.libs[IDA]!=="object"||!mw.libs[IDA]){
mw.libs[IDA]={};}
mw.libs[IDA].type=IDA;
IDA=mw.libs[IDA];
if(typeof IDA[Sub]!=="object"){
IDA[Sub]={};}
IDA[Sub].vsn=Version;
if(typeof IDA.lang!=="object"){
IDA.lang={slang:"en"};}
if(typeof IDA[Sub].texts!=="object"){
IDA[Sub].texts={
"^show":{"en":"ID Resolver","de":"ID Resolver"},
"^suffix":{"en":"&#8211; Offer multiple link targets","de":"&#8211; Mehrfache Linkziele anbieten"},
"^^layer":{"en":"Popup opac","de":"Popup undurchsichtig"},
"^^lazy":{"en":"Toolbox link only at start","de":"Nur Werkzeuglink beim Start"},
"^^light":{"en":"Visited links keep colour","en-us":"Visited links keep color",
"de":"Keine Farbmarkierung besuchter Links"},"^^linking":{"en":"All external links with choice",
"de":"Alle Weblinks mit Auswahl"},"^^make":{"en":"New tab/window for linked pages",
"de":"Neuer Browser-Tab"},"^^make0":{"en":"Always the same",
"de":"Immer derselbe"},"^^make1":{"en":"Per ID type",
"de":"Pro Bezeichner-Typ"},"^^make2":{"en":"Per domain",
"de":"Pro Domain"},"^^make3":{"en":"Always entirely new",
"de":"Immer ganz neu"},"^^spaces":{"en":"Space separated list of namespace numbers",
"de":"Namensraum-Nummern, durch Leerzeichen getrennt"}
};}
function facilitated(at){
var rls,signature,sub;
if(typeof IDA.signature==="string"){
sub="/"+Sub;
signature=IDA.signature+sub;
if(mw.loader.getState(signature)!=="ready"){
rls={};
rls[signature]="ready";
mw.loader.state(rls);
mw.hook(IDA.type+sub+".ready").fire(at);}}}
function favourite(){
var r;
switch(IDA.lang.slang){
case "de":
r="de.wikipedia.org";
break;
default:
r="enbaike.710302.xyz";}
return "//"+r+"/wiki/"+IDA.support;}
function form(auxilary,apply){
var texts=IDA[Sub].texts,dialog,opts=[];
opts.push({signature:"lazy",type:"checkbox",show:texts["^^lazy"],val:(apply.lazy?true:false)},{signature:"linking",type:"checkbox",show:texts["^^linking"],val:(apply.linking?true:false)},{signature:"layer",type:"checkbox",show:texts["^^layer"],val:(apply.layer?true:false)},{signature:"light",type:"checkbox",show:texts["^^light"],val:(apply.light?true:false)},{signature:"make",type:"radio",show:texts["^^make"],val:(apply.make?apply.make:0),poly:[{val:0,show:texts["^^make0"]},{val:1,show:texts["^^make1"]},{val:2,show:texts["^^make2"]},{val:3,show:texts["^^make3"]}
]},{signature:"spaces",type:"text",show:texts["^^spaces"],val:(apply.spaces?apply.spaces:"")});
dialog={script:IDA.type,show:texts["^show"],support:favourite(),suffix:texts["^suffix"],opts:opts};
if(typeof auxilary.form==="function"){
auxilary.form(dialog);}}
function fire(){
facilitated(form);}
fire();
}(window.mediaWiki,window.jQuery));
/// EOF</nowiki>externalLinkProblem/prego/r.js