User:PerfektesChaos/js/externalLinkProblem/prego/r.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
Documentation for this user script can be added at User:PerfektesChaos/js/externalLinkProblem/prego/r. |
/// 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":"– Manage external links with problems","de":"– 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