Jump to content

User:PerfektesChaos/js/externalLinkProblem/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/externalLinkProblem/prego/r.js
/// 2018-08-24 PerfektesChaos@de.wikipedia
/// Fingerprint:#0#32DFB8DA#
/// @license GPL [//www.mediawiki.org/w/COPYING](+GFDL,LGPL,CC-BY-SA)
///<nowiki>
(function(mw){
"use strict";
var Version=2.8,ELP="externalLinkProblem",Sub="prego";
if(typeof mw.libs[ELP]!=="object"||!mw.libs[ELP]){
mw.libs[ELP]={};}
mw.libs[ELP].type=ELP;
ELP=mw.libs[ELP];
if(typeof ELP[Sub]!=="object"){
ELP[Sub]={};}
if(typeof ELP.lang!=="object"){
ELP.lang={slang:"en"};}
if(typeof ELP[Sub].texts!=="object"){
ELP[Sub].vsn=Version;
ELP[Sub].texts={
"^show":{"en":"External-Link-Problem","de":"External-Link-Problem"},
"^suffix":{"en":"&#8211; Manage external links with problems","de":"&#8211; Problematische Weblinks managen"},
"^^last":{"en":"Recent Changes treated like watchlist","de":"Letzte Änderungen wie Beobachtungsliste behandeln"},
"^^later":{"en":"Show watchlist after clearing","de":"Beobachtungsliste bereinigt anzeigen"},
"^^lazy":{"en":"No comparison with effective URL (on talk page)","de":"Kein Abgleich mit den wirksamen URL (auf der Diskussionsseite)"},
"^^levels":{"en":"Show path segmentation","de":"Pfad segmentiert darstellen"},
"^^list":{"en":"Show bot activity on watchlist","de":"Bot auf Beobachtungsliste anzeigen"},
"^^lone":{"en":"No advertising on talk page","de":"Kein Hinweis auf der Diskussionsseite"},
"^^lookup":{"en":"Link Google search","de":"Google-Suche verlinken"},
"^^loose":{"en":"Open always a new tab/window for linked pages",
"de":"Immer ganz neues Fenster/Tab für verlinkte Ziele öffnen"},
"^^low":{"en":"Do not show any details","de":"Keine Details ermitteln"},
"^^mode":{"en":"List of details","de":"Liste der Details"},
"^^mode0":{"en":"Start hidden","de":"Anfangs zugeklappt"},
"^^mode1":{"en":"Remember last state in tab/window",
"de":"Letzten Zustand im Fenster/Tab merken"},
"^^mode2":{"en":"Start always opened","de":"Anfangs immer aufgeklappt"}
};}
function facilitated(){
var rls,signature,sub;
if(typeof ELP.signature==="string"){
sub="/"+Sub;
signature=ELP.signature+sub;
if(mw.loader.getState(signature)!=="ready"){
rls={};
rls[signature]="ready";
mw.loader.state(rls);
mw.hook(ELP.type+sub+".ready").fire();}}}}
function favorite(){
var r;
switch(ELP.lang.slang){
case "de":
r="de.wikipedia.org";
break;
default:
r="en.wikipedia.org";}
return "//"+r+"/wiki/"+ELP.support;}
function form(){
var texts=ELP[Sub].texts,dialog,opts;
if(ELP.project.trigger[0]==="talk"){
opts=[{signature:"list",type:"checkbox",show:texts["^^list"],val:(ELP.config.list?true:false)},{signature:"later",type:"checkbox",show:texts["^^later"],val:(ELP.config.later?true:false)},{signature:"last",type:"checkbox",show:texts["^^last"],val:(ELP.config.last?true:false)},{signature:"lone",type:"checkbox",show:texts["^^lone"],val:(ELP.config.lone?true:false)},{signature:"lazy",type:"checkbox",show:texts["^^lazy"],val:(ELP.config.lazy?true:false)},{signature:"loose",type:"checkbox",show:texts["^^loose"],val:(ELP.config.loose?true:false)}];
}else{
opts=[];}
opts.push({signature:"low",type:"checkbox",show:texts["^^low"],val:(ELP.config.low?true:false)},{signature:"mode",type:"radio",show:texts["^^mode"],val:(ELP.config.mode?ELP.config.mode:0),poly:[{val:0,show:texts["^^mode0"]},{val:1,show:texts["^^mode1"]},{val:2,show:texts["^^mode2"]}
]},{signature:"levels",type:"checkbox",show:texts["^^levels"],val:(ELP.config.levels?true:false)},{signature:"lookup",type:"checkbox",show:texts["^^lookup"],val:(ELP.config.lookup?true:false)});
dialog={script:ELP.type,show:texts["^show"],support:favorite(),suffix:texts["^suffix"],opts:opts};
ELP[Sub].lib.form(dialog);}
ELP[Sub].fire=function(){
facilitated();
if(typeof ELP.request==="string"&&ELP.request===Sub&&typeof ELP[Sub].lib==="object"){
ELP.request=false;
form();}
};
function first(){
facilitated();
if(typeof ELP.featuring==="function"){
ELP.featuring(ELP[Sub].fire);}}
first();
}(window.mediaWiki,window.jQuery));
/// EOF</nowiki>externalLinkProblem/prego/r.js