Jump to content

User:PerfektesChaos/js/listPageOptions/r.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by PerfektesChaos (talk | contribs) at 18:50, 20 August 2013 (2.6). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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/listPageOptions/r.js
/// 2013-08-19 PerfektesChaos@de.wikipedia
/// Fingerprint:#0#924688B1#
/// @license GPL [//www.mediawiki.org/w/COPYING](+GFDL,LGPL,CC-BY-SA)
///<nowiki>
(function(mw,$){
"use strict";
var POpt,version=2.6;
if(typeof mw.libs.listPageOptions!=="object"||!mw.libs.listPageOptions){
mw.libs.listPageOptions={};}
POpt=mw.libs.listPageOptions;
POpt.doc="[[w:en:User:PerfektesChaos/js/listPageOptions]]";
POpt.type="listPageOptions";
POpt.vsn=version;
if(!POpt.loaded){
POpt.cookie={};
POpt.disguise={};
POpt.group={"sign":POpt.type+"_groupPg","show":"groupie","soft":"enhanced"};
POpt.multi={"sign":POpt.type+"_multiPg","show":"multiple","soft":"extended"};
POpt.picked={"sign":POpt.type+"_visitedPg","show":"visited","soft":"visited"};
POpt.reduce={};
POpt.unwatch={};
POpt.values={};
POpt.texts={
"groupie":{"en":"Group by pages","de":"Seitenbezogene\xA0Gruppierung"},"multiple":{"en":"Multiple entries","de":"Mehrere\xA0Einträge"},"hide":{"en":"Hide","de":"ausblenden"},"options":{"en":"Options and notices","de":"Anzeigeoptionen"},"show":{"en":"Show","de":"einblenden"},"toggleOff":{"en":"off","de":"aus"},"toggleOn":{"en":"on","de":"ein"},"unwatch":{"en":"+ [Unwatch]","de":"+\xA0Nicht-Beobachten"},"unwatch?":{"en":"Add link for [unwatch] to every entry","de":"Link zu 'Nicht beobachten' bei jedem Eintrag"},"visited":{"en":"Visited\xA0Pages","de":"Besuchte\xA0Seiten:"},"wlnoteRE":{"en":"as of(.+,.+)\\.","de":"Stand:(.+,.+)Uhr\\.","de-at":"Stand:(.+,.+)Uhr\\.","de-ch":"Stand:(.+,.+)Uhr\\.","de-formal":"Stand:(.+,.+)Uhr\\."}
};
POpt.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"
};
POpt.sep="<span>&nbsp;|&#32;</span>";
POpt.spooling="/media/wikipedia/commons/d/de/Ajax-loader.gif";}
POpt.cookie.find=function(access){
var i,j,r=false,s="~"+access+"_";
if(!this.stored){
this.stored=$.cookie(POpt.type);
if(!this.stored){
this.stored="~";}}
i=this.stored.indexOf(s);
if(i>=0){
j=this.stored.indexOf("~",i+2);
if(j>0){
r=this.stored.substring(i+s.length,j);}}
return r;
};
POpt.cookie.flush=function(access,assign){
var i,j,s="~"+access+"_";
if(!this.stored){
this.stored="~";}
i=this.stored.indexOf(s);
s=s+assign;
if(i<0){
this.stored=s+this.stored;
}else{
j=this.stored.indexOf("~",i+2);
if(j<0){
this.stored=s+"~";
}else{
this.stored=this.stored.substr(0,i)+s+this.stored.substr(j);}}
$.cookie(POpt.type,this.stored,{path:"/"});
};
POpt.disguise.fetch=function(){
var i,low,staff,story,stuff,$e,$li,$trs,$user,leap=false,learn=false,$list=mw.util.$content.find("table.mw-enhanced-rc"),n=$list.length,seen="mw-changeslist-line-not-watched";
POpt.picked.leap=false;
this.got=[];
this.list=(n===0);
if(this.list){
$e=mw.util.$content.find("#resultListSort");
if($e.length){
$e=$e.find("ol");
}else{
$e=mw.util.$content.find("UL.special");}
if($e.length){
$list=$e.children("li");
n=$list.length;
for(i=0;i<n;i++){
$li=$list.eq(i);
if(POpt.picked.learn){
learn=$li.hasClass(seen);
if(learn){
POpt.picked.leap=true;
}else{
leap=true;}}
$e=$li.children("a").eq(0);
stuff=$e.attr("href");
stuff=$li.find("A.mw-changeslist-title").attr("href");
$user=$li.find("A.mw-userlink");
if($user.length){
staff=$user.attr("href");
}else{
staff=false;}
low=($li.children(".minoredit").length>0);
if(POpt.letal){
story=false;}
this.got.push([$li,stuff,staff,low,learn,story]);}}
}else{
staff=false;
for(i=0;i<n;i++){
$li=$list.eq(i);
if(POpt.picked.learn){
learn=$li.hasClass(seen);
if(learn){
POpt.picked.leap=true;
}else{
leap=true;}}
$trs=$li.children("tbody").children("tr");
stuff=$trs.find("SPAN.mw-title").children("a").attr("href");
$e=$trs.find("A.mw-userlink");
staff=false;
switch($e.length){
case 0:
break;
case 1:
staff=$e.attr("href");
break;
default:
$e=$trs.find(".changedby").children("A.mw-userlink");
if($e.length===1){
staff=$e.attr("href");
}else if(this.reLeyo){
$e=$trs.eq(1).find("A.mw-userlink");
staff=$e.attr("href");}}
if(this.reLeyo&&staff){
if(this.reLeyo.test(staff)){
$li.remove();
$li=false;}}
if($li){
low=($trs.children(".minoredit").length>0);
this.got.push([$li,stuff,staff,low,learn,story]);}}}
POpt.picked.leap=(POpt.picked.leap&&leap);
};
POpt.disguise.filter=function(alter,abandon,account,ant){
var i,l,n,q,rep,reu,s,r=false;
if(alter||abandon||account||(POpt.picked.learn&&POpt.picked.leap)){
if(!this.got){
this.fetch();}
n=this.got.length;
if(n){
if(alter||!this.list){
rep="/wiki/";
if(alter){
if(!this.special){
q=mw.config.get("wgFormattedNamespaces");
if(q){
rep=q[-1];}
this.special=rep+":";}
rep=this.special;}
}else{
rep="/w(iki/|/index\\.php\\?title=)";}
if(abandon){
s=POpt.format(abandon);
}else{
s="";}
rep=new RegExp(rep+s);
reu=this.format(account);
r=true;
for(i=0;i<n;i++){
q=this.got[i];
if(q){
l=false;
if(rep.test(q[1])){
l=alter;
if(reu){
l=reu.test(q[2]);}
if(l&&ant){
l=q[3];}}
if(l){
q[0].remove();
this.got[i]=false;
}else{
r=false;}}}}}
return r;
};
POpt.disguise.fire=function(){
var i,k,n,q;
if(POpt.leyo){
this.fresh();}
if($.isArray(POpt.hide)){
n=POpt.hide.length;
for(i=0;i<n;i++){
q=POpt.hide[i];
if($.isArray(q)){
k=q[2];
if(!k||k===POpt.mode){
if(this.filter(q[0],q[1],q[3],q[4])){
break;}}}}}
};
POpt.disguise.format=function(account){
var r;
if(account){
r=new RegExp("/w(iki/|/index.php?title=)[^:]+:"+POpt.format(account));
}else{
r=false;}
return r;
};
POpt.disguise.fresh=function(){
this.reLeyo=this.format(mw.config.get("wgUserName"));
this.fetch();
};
POpt.group.find=function(assigned){
var $grab,less=false;
if(assigned){
less=(assigned==="1");
}else{
$grab=mw.util.$content.find(".mw-enhanced-rc");
if($grab.length){
less=true;
}else if(!this.leaves){
if(mw.user.options.get("usenewrc")){
less=true;}}}
POpt.values.ctl2url[this.sign].val=(less?"1":"0");
};
POpt.multi.find=function(assigned){
var less=false;
if(assigned){
less=(assigned==="1");
}else{
if(mw.user.options.get("extendwatchlist")){
less=true;}}
POpt.values.ctl2url[this.sign].val=(less?"1":"0");
};
POpt.picked.feature=function(){
return POpt.feature((this.learning?"hide":"show"));
};
POpt.picked.fire=function(){
var i,q,n=POpt.disguise.got.length,s=(this.learning&&this.leap?"none":"block");
for(i=0;i<n;i++){
q=POpt.disguise.got[i];
if(q[4]){
q[0].css("display",s);}}
if(!this.$toggle){
this.$toggle=POpt.values.$form.find("#"+this.sign);}
POpt.cookie.flush("learnt",this.learning);
this.learning=!this.learning;
this.$toggle.text(this.feature());
};
POpt.picked.furnish=function(){
var s;
if(POpt.values.$form.length){
s=POpt.cookie.find("learnt");
if(s){
this.learning=(s==="true");
}else{
this.learning=POpt.learnt;
POpt.cookie.flush("learnt",this.learning);}
s=POpt.feature(this.show);
if(this.leap){
s="<span>"+s+" <a href='"+POpt.script+".picked.fire()' id='"+this.sign+"'>"+this.feature()+"</a></span>";
}else{
s="<span style='color:#B0B0B0'>"+s+" ./.</span>";
if(POpt.mode===2){
this.learning=false;}}
s=POpt.sep+s;
if(POpt.mode===2&&!POpt.lean){
s=s+"<hr />";}
POpt.values.$form.prepend($(s));
this.fire();}
};
POpt.reduce.facility=function(){
this.$box.attr("style",null);
this.$resuscitate.attr("style","display:none");
this.lower=false;
POpt.cookie.flush("lower",this.lower);
};
POpt.reduce.fade=function(){
this.$resuscitate.attr("style","margin-top: 10px;");
this.$box.attr("style","display:none");
this.lower=true;
POpt.cookie.flush("lower",this.lower);
};
POpt.reduce.furnish=function(){
var $btn,got,re,s=POpt.cookie.find("lower"),script="javascript",shoot=script+":window.mw.libs."+POpt.type+".reduce.";
if(s){
this.lower=(s==="true");
}else{
this.lower=POpt.lower;
POpt.cookie.flush("lower",this.lower);}
s=(POpt.mode===1?"#mw-watchlist-options":".rcoptions");
this.$box=mw.util.$content.find(s);
if(this.$box.length){
this.$resuscitate=$("<div style='margin-top: 10px;' />");
this.$resuscitate.attr("id",POpt.type+"_resuscitate");
if(POpt.mode===1){
s=this.$box.text();
if(s){
re=new RegExp(POpt.feature("wlnoteRE",true));
got=re.exec(s);
if(got){
this.$resuscitate.append("<span>"+got[1]+"</span>");}}}
$btn=$("<button type='button' id='"+POpt.type+"_optShow' onclick='"+shoot+"facility();void(0);'>"+POpt.feature("options")+"</button>");
this.$resuscitate.append($btn);
this.$box.before(this.$resuscitate);
$btn=$("<button type='button' id='"+POpt.type+"_optHide' style='margin-left:8px;float:right;' onclick='"+shoot+"fade();void(0);'><span style='font-weight:bold;color:#FF0000;'>X</span></button>");
this.$box.prepend($btn);
if(this.lower){
this.fade();
}else{
this.facility();}}
};
POpt.unwatch.factory=function(){
var s,$e=$(this);
if(POpt.unwatch.less){
$e=$e.parent();
}else{
s=$e.attr("class");
if(s){
if(s.indexOf("mw-changeslist-line-")<0){
$e=false;}
}else{
$e=false;}}
if($e){
$e.find("a").each(POpt.unwatch.feed);}
return true;
};
POpt.unwatch.fault=function(arrived){
var q,$d=mw.util.$content.find(".curid"+q);
if($d.length){
$d.empty();
$d.append($("<span style='border: solid 2px #FF0000; color: #FF0000; margin-left: 5px;'><strong>ERROR</strong></span>"));}
mw.log({loud:true},"."+POpt.type+".unwatch.fault()",2,arrived);
};
POpt.unwatch.feed=function(){
var g,id,loop=true,$e=$(this),s=$e.attr("href");
if(s&&s.indexOf("&action=history")>0){
g=/[?&]title=([^&]+)(&.+)*&curid=([0-9]+)(&.+)?$/.exec(s);
if(g){
s="\""+g[1].replace(/\"/g, "%22" )
.replace(/\'/g, "%27" )  +  "\"";
id=g[3];
s="<span> | </span><span class='curid"+id+"'><a href='"+POpt.script+".unwatch.fire("+id+","+s+",true);void(0);'>"+POpt.unwatch.flag(false)+"</a></span>";
$e.after($(s));
loop=false;}}
return loop;
};
POpt.unwatch.fiat=function(){
mw.util.addPortletLink("p-tb",POpt.script+".unwatch.furnish();void(0);",POpt.feature("unwatch"),"t-unwatch",POpt.feature("unwatch?"),"w",null);
};
POpt.unwatch.fine=function($apply){
$apply.children("img").remove();
$apply.each(POpt.unwatch.fix);
};
POpt.unwatch.fire=function(access,assign,action){
var d,q,promise,$e=mw.util.$content.find(".curid"+access),$i;
if($e.length){
q=new mw.Api();
if(action){
promise=q.unwatch(assign);
}else{
promise=q.watch(assign);}
d="<img src='"+POpt.spooling+"' height='16' alt='Ajax' />";
$i=$(d);
$e.children("a").attr("style","display:none");
$e.append($i);
promise.done(function(){POpt.unwatch.fine($e);}).fail(this.fault);}
};
POpt.unwatch.fix=function(){
var s,leave,$e=$(this),$a=$e.children("a");
if($a.length){
$a.attr("style","display:inline");
s=$a.attr("href");
$a.empty();
leave=(s.indexOf("true);void(0);")>0);
if(leave){
s=s.replace(/true\);void\(0\);/,"false);void(0);");
}else{
s=s.replace(/false\);void\(0\);/,"true);void(0);");}
$a.attr("href",s);
s="<strong>"+POpt.unwatch.flag(leave)+"</strong>";
$a.append($(s));}
};
POpt.unwatch.flag=function(again){
return("["+(again?"///":String.fromCharCode(8212))+"]");
};
POpt.unwatch.furnish=function(){
var seek,$list=mw.util.$content.find("#mw-content-text");
if($list.length){
this.less=POpt.values.ctl2url[POpt.group.sign].val;
this.less=(this.less==="0"?false:this.less);
seek=(this.less?".mw-title":"li");
$list.find(seek).each(this.factory);}
$(window.document).find("#t-unwatch").remove();
};
POpt.values.factory=function(){
var s,r="";
for(s in this.ctl2url){
r=r+this.fiat(s);}
return r;
};
POpt.values.fiat=function(access){
var par=this.ctl2url[access],r="",s=access;
if(par){
if(par.val!==undefined){
if(par.url){
s=par.url;}
if(par.type==="checkbox"){
if(typeof par.val!=="string"){
par.val=(par.val?"1":"0");}}
r="&"+s+"="+par.val;}}
return r;
};
POpt.values.find=function(around,adapt){
var $input;
this.first();
this.$wrap=mw.util.$content.find(around);
if(this.$wrap.length){
this.$form=mw.util.$content.find(adapt);
if(this.$form.length){
$input=this.$form.find("input");
$input.each(this.found);}
}else{
this.$wrap=false;}
};
POpt.values.first=function(){
if(!this.ctl2url){
this.ctl2url={"associated":{type:"checkbox"},"days":{name:"days",type:false},"hideAnons":{type:"checkbox"},"hideBots":{type:"checkbox"},"hideLiu":{type:"checkbox"},"hideMinor":{type:"checkbox"},"hideOwn":{type:"checkbox"},"hideReviewed":{type:"checkbox"},"hideWikibase":{type:"checkbox"},"nsinvert":{type:"checkbox",url:"invert"},"namespace":{type:"select"}
};
this.ctl2url[POpt.group.sign]={type:"checkbox",url:POpt.group.soft};
this.ctl2url[POpt.multi.sign]={type:"checkbox",url:POpt.multi.soft};
if(POpt.mode===2){
this.ctl2url.from={type:false};
this.ctl2url.limit={type:false};
this.ctl2url.tagfilter={type:"text"};}}
};
POpt.values.fix=function(access){
if(!this.$hrefs&&this.$wrap){
this.$hrefs=this.$wrap.find("a");}
if(typeof this.$hrefs!=="boolean"){
this.current=this.ctl2url[access];
if(!this.current.url){
this.current.url=access;}
this.$hrefs.each(this.fixing);}
};
POpt.values.fixing=function(at,access){
var got,par,swap,$e;
if(at<0){
$e=access;
}else{
$e=$(access);}
swap=$e.attr("href");
if(!POpt.values.script){
POpt.values.script=mw.config.get("wgScript");}
if(swap.indexOf(POpt.values.script)<0){
swap=false;}
if(swap){
par=POpt.values.current;
if(par.val!==undefined){
if(!par.reURL){
par.reURL="([?&]"+par.url+"=)(?:[^&]*)(&?.+)?$";
par.reURL=new RegExp(par.reURL);}
if(par.type==="checkbox"){
if(typeof par.val!=="string"){
par.val=(par.val?"1":"0");}}
got=par.reURL.exec(swap);
if(got){
swap=swap.replace(par.reURL,"$1"+par.val+"$2");
}else{
swap=swap+"&"+par.url+"="+par.val;}
$e.attr("href",swap);}}
return true;
};
POpt.values.flat=function(){
var $e=this.$wrap.find("br, hr"),$sep=$("<span> | </span>");
$e.before($sep.clone());
$e.remove();
this.$wrap.find("p, form, ul").css("display","inline");
};
POpt.values.flip=function(access){
var s,$e,par=this.ctl2url[access];
if(par){
if(!par.$ctl){
par.$ctl=this.$form.find("#"+access);}
if(par.$ctl&&par.$ctl.length){
if(par.type==="checkbox"){
s=par.$ctl.attr("value");
if(s){
s=(s==="0"?"1":"0");
}else{
s=(par.$ctl.prop("checked")?"1":"0");}
par.$ctl.val(s);
if(s==="0"){
par.$ctl.removeAttr("checked");}
if(POpt.mode===1){
switch(access){
case POpt.group.sign:
POpt.flip(s,"1",POpt.multi);
break;
case POpt.multi.sign:
POpt.flip(s,"0",POpt.group);
break;}}
}else{
s=par.$ctl.val();}
par.val=s;
$e=this.$form.find("#hidden_"+access);
if($e.length){
$e.val(s);}
this.fix(access);}}
};
POpt.values.found=function(){
var par,sign,$input=$(this);
if($input.attr("type")==="hidden"){
sign=$input.attr("name");
par=POpt.values.ctl2url[sign];
if(par){
par.val=$input.val();}}
return true;
};
POpt.values.furnish=function(access){
var s,par=this.ctl2url[access];
if(par){
if(!par.$ctl){
if(this.$form){
par.$ctl=this.$form.find("#"+access);}}
if(par.$ctl){
if(par.type==="checkbox"){
s=(par.$ctl.prop("checked")?"1":"0");
}else{
s=par.$ctl.val();}
par.val=s;
s=POpt.self+".values.flip('"+access+"');";
par.$ctl.attr("onchange",s);}}
};
POpt.facilitate=function(){
var i,last,par,sign,src,$e,bools=["hideMinor","hideBots","hideAnons","hideLiu","hideOwn","hideReviewed"
],j=(this.mode===1?8:9),n=j+bools.length,k=0,$set=POpt.values.$wrap.find("a");
for(i=j;i<n;i++){
sign=bools[k];
par=POpt.values.ctl2url[sign];
last=par.val;
src="<input type='checkbox' id='"+sign+"'"+(last?" checked":"")+" onchange='"+POpt.self+".values.flip(\""+sign+"\")'"+" />";
par.$ctl=$(src);
par.$ctl.val((last?"1":"0"));
$e=$set.eq(i);
$e.attr("id","link_"+sign);
$e.before($(src));
src="<input type='hidden' id='hidden_"+sign+"' name='"+sign+"' value='"+(last?"1'":"0'")+" />";
$e=$(src);
$e.val((last?"1":"0"));
POpt.values.$form.append($e);
k++;}
};
POpt.factory=function(assign,ahead){
var less,shift,sub,show="";
if(this.values.$form.length){
if(!this.values.script){
this.values.script=mw.config.get("wgScript");}
less=this.values.ctl2url[assign.sign].val;
if(less==="0"){
less=false;}
shift=this.values.script+"?title=Special:"+this.special+this.values.factory();
sub="&"+assign.soft+"=";
shift=shift.replace(new RegExp(sub+"?[01]"),sub+(less?"0":"1"));
if(this.mode===1){
if(shift.indexOf("&extended=0")>0){
shift=shift.replace(/&enhanced=1/,"&enhanced=0");}
if(shift.indexOf("&enhanced=1")>0){
if(shift.indexOf("&extended=")>0){
shift=shift.replace(/&extended=0/,"&extended=1");
}else{
shift=shift+"&extended=1";}}
if(!this.lean&&ahead){
show="<hr />";
}else if(!ahead){
show=this.sep;}}
show=show+"<input type='checkbox' id='"+assign.sign+"' name='"+assign.soft+"' value='"+(less?"1'":"0'")+(less?" checked":"")+" onchange='"+this.self+".values.flip(\""+assign.sign+"\")'"+" />"+"<label>"+this.feature(assign.show)+" ("+"<a href='"+shift+"'>"+this.feature((less?"toggleOff":"toggleOn"))+"</a>)"+"</label>";
this.values.$form.prepend($(show));}
};
POpt.feature=function(apply,appoint){
var e,r;
if(!this.slang){
this.slang=mw.config.get("wgUserLanguage").toLowerCase();}
e=this.texts[apply];
if(e){
if(appoint){
r=e[this.slang];
}else{
if(!this.slangs){
this.slangs=this.trans[this.slang];
if(!this.slangs){
this.slangs="en";}}
r=e[this.slangs];
if(!r){
r=e.en;
if(!r){
r="???"+apply+"???";}}}
}else{
r="***"+apply+"***";}
return r;
};
POpt.fiat=function(){
var sep,story,suite,$grab;
switch(POpt.mode){
case 1:
sep=".mw-changeslist-separator";
$grab=mw.util.$content.find(sep);
POpt.group.leaves=($grab.length>0);
if(POpt.group.leaves){
POpt.unwatch.fiat();}
story="#mw-watchlist-options";
suite="#mw-watchlist-form-namespaceselector";
break;
case 2:
POpt.group.leaves=true;
story=".rcoptions";
suite="form";
break;}
POpt.values.find(story,suite);
if(POpt.luxury){
POpt.facilitate();}
POpt.values.furnish("associated");
POpt.values.furnish("nsinvert");
POpt.values.furnish("namespace");
POpt.picked.learn=(typeof POpt.learnt==="boolean");
if(POpt.hide||POpt.picked.learn||POpt.letal||POpt.leyo){
POpt.disguise.fire();}
if(POpt.picked.learn&&POpt.mode===1){
POpt.picked.furnish();}
if(typeof POpt.lower==="boolean"){
POpt.reduce.furnish();}
POpt.furnish(POpt.group,false);
if(POpt.mode===1){
POpt.furnish(POpt.multi,true);}
if(POpt.lean){
POpt.values.flat();}
};
POpt.fire=function(){
this.mode=0;
this.special=mw.config.get("wgCanonicalSpecialPageName");
switch(this.special){
case "Watchlist":
this.mode=1;
break;
case "Recentchanges":
this.mode=2;
break;}
if(this.mode){
mw.loader.using(["user","user.options","jquery.cookie","mediawiki.api","mediawiki.api.watch","mediawiki.user","mediawiki.util"],this.first());}
};
POpt.first=function(){
POpt.self="mw.libs."+POpt.type;
POpt.script="javascript"+String.fromCharCode(58)+POpt.self;
$(window.document).ready(POpt.fiat);
};
POpt.flip=function(alter,allow,assign){
var co,s;
if(alter===allow){
s=assign.sign;
co=this.values.ctl2url[s];
if(co){
if(co.val!==allow){
if(!co.$ctl){
if(this.values.$form){
co.$ctl=this.values.$form.find("#"+s);}}
if(co.$ctl){
co.$ctl.click();}}}}
};
POpt.format=function(access){
var i,k,n,s,r=access;
if(r){
if(access.indexOf("%")<0){
n=access.length;
r="";
for(i=n-1;i>=0;i--){
k=access.charCodeAt(i);
s=String.fromCharCode(k);
if(k>127){
s=encodeURI(s);}
r=s+r;}
s=mw.util.wikiUrlencode(r);
}else{
if(!this.sp2_){
this.sp2_=new RegExp(" ","g");}
r=r.replace(this.sp2_,"_");}}
return r;
};
POpt.furnish=function(assign,ahead){
var set=mw.util.getParamValue(assign.soft);
assign.find(set);
POpt.values.fix(assign.sign);
this.factory(assign,ahead);
};
if(!POpt.loaded){
POpt.loaded=true;
if(mw.config.get("wgNamespaceNumber")===-1){
POpt.fire();}
mw.loader.state("ext.gadget."+POpt.type,"ready");}
}(window.mediaWiki,window.jQuery));
/// EOF</nowiki>listPageOptions/r.js