Wikiup:Dateiwartung/Werkzeug.js

aus Wikipedia, der freien Enzyklopädie
< Wikiup:Dateiwartung
Dies ist die aktuelle Version dieser Seite, zuletzt bearbeitet am 28. April 2014 um 13:26 Uhr durch imported>Yellowcard(261473) (Schützte „Wikipedia:Dateiwartung/Werkzeug.js“: JavaScript ([Bearbeiten=Nur Administratoren] (unbeschränkt) [Verschieben=Nur Administratoren] (unbeschränkt))).
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

///

<nowiki>f i l e A d m
/// 2013-08-25 PerfektesChaos@de.wikipedia
/// Fingerprint:#0#A296902D#
(function(mw){
"use strict";
var FAdm,vsn=1;
if(typeof(mw.libs.fileAdm)!=="object"){
mw.libs.fileAdm={};}
FAdm=mw.libs.fileAdm;
FAdm.doc="[[w:de:Wikipedia:Dateiwartung/Werkzeug]]";
FAdm.obj="mw.libs";
FAdm.type="fileAdm";
FAdm.vsn=vsn;
if(typeof(FAdm.bb)!=="object"){
FAdm.bb={};}
}(mediaWiki));
mediaWiki.libs.fileAdm.bb.debugging=function(FAdm){
"use strict";
if(typeof FAdm.debugging!=="object"){
FAdm.debugging={loud:false};}
FAdm.debugging.fit=function(){
if(this.loud===undefined){
this.loud=false;}
if(this.loud){
this.man=0;
this.max=200;
this.say="fileAdm";
if(this.dummy===undefined){
this.dummy="Wikipedia:Dateiwartung/Werkzeug/Programmierung/";}
if(this.dummy){
FAdm.review.stamp=this.dummy+"Vorlage:"+FAdm.review.stamp;
FAdm.trans.stamp=this.dummy+"Vorlage:"+FAdm.trans.stamp;
FAdm.trans.bot.pageName=this.dummy+FAdm.trans.bot.pageName;}}
};
};
mediaWiki.libs.fileAdm.bb.debugging(mediaWiki.libs.fileAdm);
delete mediaWiki.libs.fileAdm.bb.debugging;
mediaWiki.libs.fileAdm.bb.all=function(FAdm,mw){
"use strict";
if(typeof FAdm.all!=="object"){
FAdm.all={lang:{},proj:{},user:{}};}
if(typeof FAdm.all.lang!=="object"){
FAdm.all.lang={};}
if(typeof FAdm.all.proj!=="object"){
FAdm.all.proj={};}
if(typeof FAdm.all.user!=="object"){
FAdm.all.user={};}
FAdm.ns={is:-9,nMedia:-2,nSpecial:-1,nUser:2,nProject:4,nFile:6,nTemplate:10,nCat:14,nOthers1:-999};
FAdm.hover=false;
FAdm.ia=false;
FAdm.key=false;
FAdm.all.userlang={
"de":"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"
};
FAdm.all.favorite=function(){
var r=mw.config.get("wgUserLanguage").toLowerCase(),s;
if(r.length>4){
if(r.charCodeAt(2)===45){
r=r.substr(0,2);}}
s=this.userlang[r];
r=(s?s:"en");
return r;
};
FAdm.all.fit=function(){
var slang=this.favorite();
this.proj.any();
FAdm.str.dbName=mw.config.get("wgDBname");
switch(FAdm.str.dbName){
case "dewiki":
this.proj[FAdm.str.dbName]();
break;
case "commonswiki":
FAdm.misc.local=false;
default:
this.proj.unknown();}
switch(mw.config.get("wgContentLanguage")){
case "de":
this.lang.de();
break;
default:
this.lang.en();}
this.user[slang]();
this.fill();
FAdm.opt.fit();
FAdm.debugging.fit();
};
FAdm.all.proj.any=function(){
FAdm.batch.clock="//upload.wikimedia.org/wikipedia/commons/d/de/Ajax-loader.gif";
FAdm.batch.maxTitles=50;
FAdm.batch.watch=false;
FAdm.batch.watchQ="watch";
FAdm.batch.watchT="watch";
FAdm.cat.regexpMaintain=false;
FAdm.cat.reMaintain=false;
FAdm.cat.start=false;
FAdm.file.info={};
FAdm.guide.cats={
none:"border: solid 3px #FF0000; background-color: #E9967A",category:"background-color: #FF69B4",checking:[false,"border: solid 2px #FF0000"],checkX:"border:solid 2px #FF0000;background-color:#CFFFCF",invalid:"border:solid 4px #FFA000;background-color:#FF1493",license:[false,"border:solid 2px #006000;background-color:#80FF80"],review0:[false,"background-color: #FF8C00"],review1:[false,"background-color: #F0E68C"],review1X:"background-color: #A0A0A0",review2:[false,"background-color: #CFFFCF"],transfer:[false,"border:solid 2px #0000FF;background-color:#CFFFCF"],transfix:[false,"border:solid 2px #0000FF;background-color:#D0D0FF"],transit:[false,"border:solid 2px #0000FF;background-color:#F0E68C"],transmit:[false,"border:solid 2px #0000FF;background-color:#CFFFCF"],transnot:"border:solid 2px #0000FF;background-color:#C0C0C0",trash:[false,"border:solid 2px #0000FF;background-color:#FF8080"],lazyRE:true};
FAdm.guide.multiQuery=5;
FAdm.guide.selTemplate="#fileAdm_Guide-collection";
FAdm.queer.opts=false;
FAdm.queer.textarea=[3,40];
FAdm.review.selTemplate="#fileAdm_Review";
FAdm.trans.subject="Transfer to Commons by Bot";
FAdm.trans.idle.id="fileAdm_Transfer_idle";
FAdm.trans.vsn.sel=".multiVersion";
};
FAdm.all.proj.dewiki=function(){
FAdm.batch.reBlacklist="[_.;,]Werbung[_.;,]";
FAdm.batch.selfSign="Werkzeug";
FAdm.cat.hidden="Kategorie:Versteckt";
FAdm.cat.reMaintain="(Datei:Datei-Wartung)";
FAdm.cat.reNoParSuggest="(^ *(Wikipedia|Logo \\())";
FAdm.cat.selTemplate="#Dateikategorie";
FAdm.cat.stamp="Dateikategorie";
FAdm.cat.start="Datei:";
FAdm.edit.defaultsort="SORTIERUNG";
FAdm.file.info.template=["Information","Beschreibung","Quelle","Urheber","Datum","Genehmigung","Andere Versionen"];
FAdm.file.info.align=55;
FAdm.file.info.reTmpl=false;
FAdm.file.stNoCommons="NoCommons";
FAdm.file.stNowCommons="NowCommons";
FAdm.file.replace=[["{{ *[bB]ild-SH *}}","{{Bild-PD-Schöpfungshöhe}}"],["{{[cC]opy to Wikimedia Commons}}","{{Commonsfähig}}"],["{{ *[dD](ÜP|üp) *(}}|\\|)","{{Dateiüberprüfung$2"],["{{ *[dD]ateiüberprüfung *(}}|\\|)","{{Dateiüberprüfung$1"],["{{ *[Ss]vg *}}","{{In SVG konvertieren}}"],["{{ *[mM]angelhafte[ _]SVG *}}","{{Mangelhafte Vektorisierung}}"],["{{ *[nN]C *(}}|\\|)","{{NowCommons$1"],["{{ *[nN]ow[ _]Commons *(}}|\\|)","{{NowCommons$1"],["{{ *[nN]owcommons *(}}|\\|)","{{NowCommons$1"],["^=([^=\n].*[^=\n])= *\n","==$1==\n"],["\n=([^=\n].*[^=\n])= *\n","\n==$1==\n"],["^(=+) *([^ =\n].*[^ =\n]) *\\1\n","$1 $2 $1\n"],["\n(=+) *([^ =\n].*[^ =\n]) *\\1\n","\n$1 $2 $1\n"]];
FAdm.file.selCommons="#commons_descr";
FAdm.file.selNowCommons="#Vorlage_NowCommons";
FAdm.guide.cats.checking[0]="Wikipedia:Dateiüberprüfung.*";
FAdm.guide.cats.license[0]=["Datei:By.*","Datei:CC-by.*","Datei:CC-Zero","Datei:Frei","Datei:GFDL","Datei:LogoSH","Datei:Musik-PD .*","Datei:Musikzitat","Datei:Public Domain .*","Datei:Wikimedia-Copyright"];
FAdm.guide.cats.review0[0]="Datei:NoCommons";
FAdm.guide.cats.review1[0]="Datei:Zweitprüfung ausstehend";
FAdm.guide.cats.review2[0]="Datei:Geprüfte Datei";
FAdm.guide.cats.transfer[0]=["Datei:By","Datei:CC-Zero","Datei:Frei","Datei:GFDL","Datei:Public Domain .*"];
FAdm.guide.cats.transfix[0]="Datei:Nach Commons verschieben (bestätigt)";
FAdm.guide.cats.transit[0]="Datei:Nach Commons verschieben (Bestätigung nötig)";
FAdm.guide.cats.transmit[0]="Datei:Commonsfähig";
FAdm.guide.cats.trash[0]="Datei:NowCommons.*";
FAdm.guide.linkState={hotkey:"s"};
FAdm.ns.nOthers1=100;
FAdm.opt.keep=0;
FAdm.opt.page.id=6425961;
FAdm.queer.opts=[
{key:"Quelle",hint:"Wenn nicht deutlich wird, woher der Uploader die Datei hat"},{key:"Urheber",hint:"Wenn nicht deutlich wird, wer der Urheber der Datei ist"},{key:"Lizenz",hint:"Wenn die Datei nicht unter einer freien Lizenz veröffentlicht wurde"},{key:"Freigabe",hint:"Wenn nicht deutlich wird, dass der Urheber einer freien Lizenz zugestimmt hat"},{key:"Gezeigtes Werk",hint:"Wenn nicht klar ist, dass der Urheber des Originalwerks einer freien Lizenz zugestimmt hat"},{key:"1923",hint:"Für Bilder nach der 1923er-Regel, deren Diskussionslink fehlt."},{key:"Besonderer Fall",hint:"Wenn ein besonderer Fall vorliegt (persönliche Benachrichtigung)"}];
FAdm.queer.stamp="Dateiüberprüfung";
FAdm.queer.specific="Hinweis";
FAdm.queer.quest=[FAdm.queer.stamp,"DÜP","Düp","DÜp","DüP"];
FAdm.queer.stampNotified="Dateiüberprüfung/benachrichtigt (Text)";
FAdm.review.selTemplate="#filereview-successful";
FAdm.review.stamp="Geprüfte Datei";
FAdm.trans.stable="Commonsfähig";
FAdm.trans.stamp="Nach Commons verschieben (bestätigt)";
FAdm.trans.suitable="Nach Commons verschieben (Bestätigung nötig)";
FAdm.trans.bot.pageName="Wikipedia:Commons-Transfer per Bot/Anfragen";
FAdm.users.r=6358806;
FAdm.users.t=6426331;
FAdm.wins.lot=true;
};
FAdm.all.proj.unknown=function(){
FAdm.cat.action=false;
FAdm.file.action=false;
FAdm.guide.action=false;
};
FAdm.all.lang.de=function(){
FAdm.edit.summary0="kosmetische Änderungen";
FAdm.queer.summary="Dateiüberprüfung";
FAdm.review.summary1="Erste Dateiprüfung";
FAdm.review.summary2="Zweite Dateiprüfung";
FAdm.trans.summary="Markierung für CTB gesetzt";
FAdm.trans.bot.sayConfirm="Bestätige Transferwunsch";
FAdm.trans.vsn.say="Mehrfache Dateiversionen";
};
FAdm.all.lang.en=function(){
FAdm.edit.summary0="cosmetic changes";
FAdm.queer.summary="File check";
FAdm.review.summary1="First file review";
FAdm.review.summary2="Second file review";
FAdm.trans.summary="Marked for transfer to Commons";
FAdm.trans.bot.sayConfirm="Confirm transfer request";
FAdm.trans.vsn.say="Multiple file versions";
};
FAdm.all.user.de=function(){
FAdm.batch.sayActive="Kommuniziere mit dem GROSSEN GURU";
FAdm.batch.sayCurrentVsn="Aktuelle Version anzeigen";
FAdm.batch.sayModified="Änderung vorgenommen";
FAdm.batch.sayNoText="Kein Text";
FAdm.batch.sayNothing2do="Nichts zu tun";
FAdm.cat.sayNoTemplate="Fehlende Vorlage";
FAdm.guide.linkState.hint="Jede Datei nach Status markieren";
FAdm.guide.linkState.title="Datei-Status zeigen";
FAdm.guide.toggleImg={hint:"Miniaturbilder verbergen?",hotkey:"-",off:"zeigen",on:"ausblenden",title:"Miniaturbilder"};
FAdm.guide.toggleTgt={hint:"Links in anderes Fenster?",hotkey:"*",off:"gleich",on:"separat",title:"Zielfenster"};
FAdm.guide.xClm={hint:"Spalte mit Direktlinks?",hotkey:"<",title:"Bearbeitung"};
FAdm.queer.link={hint:"Dateiüberprüfung",hotkey:"ü",title:"DÜP"};
FAdm.queer.soft="Bearbeiten mit DÜP-Markierung";
FAdm.queer.shift="Markiere als DÜP";
FAdm.queer.subject="DÜP";
FAdm.review.scatter="Noch keine Kategorie";
FAdm.review.scope="Ohne NoCommons";
FAdm.review.second="Bereits zweimal geprüft";
FAdm.review.self="Du hast hier bereits geprüft";
FAdm.review.setup="Bisher noch nie geprüft";
FAdm.review.shift="Markiere als geprüft";
FAdm.review.signed="Erste Prüfung bereits erfolgt";
FAdm.review.soft="Bearbeiten mit Prüfmarkierung";
FAdm.review.subject="Dateiprüfung";
FAdm.review.sucks="Dateiüberprüfung";
FAdm.str.sayConflict="KONFLIKT";
FAdm.trans.sayNo="Seite ist gleichzeitig NoCommons und für Commons vorgesehen";
FAdm.trans.shift="Markiere für CTB";
FAdm.trans.soft="Bearbeiten mit CTB-Markierung";
FAdm.trans.sucks="Konflikt mit NoCommons";
FAdm.trans.bot.save="Speichern++";
FAdm.trans.idle.say="Erneuter Transfer";
FAdm.trans.idle.sleep="Keine Änderung seit 3 Tagen";
};
FAdm.all.user.en=function(){
FAdm.batch.sayActive="Contacting Wiki Server";
FAdm.batch.sayCurrentVsn="Show current version";
FAdm.batch.sayModified="Modification performed";
FAdm.batch.sayNoText="No Text";
FAdm.batch.sayNothing2do="Nothing to do";
FAdm.cat.sayNoTemplate="Template missing";
FAdm.guide.linkState.hint="Mark any file by state";
FAdm.guide.linkState.title="Show file state";
FAdm.guide.toggleImg={hint:"Hide thumbnails?",hotkey:"-",off:"(hide)",on:" (show)",title:"Thumbnails"};
FAdm.guide.toggleTgt={hint:"Link into other window?",hotkey:"*",off:"(same)",on:"(different)",title:"Target window"};
FAdm.guide.xClm={hint:"Column with direct links?",hotkey:"<",title:"Editing"};
FAdm.queer.link={hint:"File checking needed?",hotkey:"9",title:"File checking"};
FAdm.queer.soft="Edit with file check mark";
FAdm.queer.shift="Mark for file check";
FAdm.queer.subject="File check";
FAdm.review.scatter="No category yet";
FAdm.review.scope="NoCommons not seen";
FAdm.review.second="Two file reviews done";
FAdm.review.self="You have reviewed here already";
FAdm.review.setup="Never reviewed yet";
FAdm.review.shift="Mark as reviewed";
FAdm.review.signed="First review already done";
FAdm.review.soft="Edit with review mark";
FAdm.review.subject="File review";
FAdm.review.sucks="File check";
FAdm.str.sayConflict="CONFLICT";
FAdm.trans.sayNo="File is supposed to be both NoCommons and on Commons";
FAdm.trans.shift="Mark for CTB";
FAdm.trans.soft="Edit with CTB mark";
FAdm.trans.sucks="Conflict with NoCommons";
FAdm.trans.bot.save="Save++";
FAdm.trans.idle.say="New attempt to transfer";
FAdm.trans.idle.sleep="No changes within 3 days";
};
FAdm.all.fill=function(){
FAdm.batch.api=false;
FAdm.batch.page=false;
FAdm.batch.styleButton="background:      #D0D0D0;color:           #000000;font-size:       100%;font-weight:     normal;text-decoration: none;padding:         2px;border-style:    solid;border-width:    2px;border-color:    #E0E0E0 #E0E0E0 #707070 #707070;";
FAdm.cat.tools=false;
FAdm.file.cats=false;
FAdm.file.lone=true;
FAdm.file.mode=0;
FAdm.file.type=false;
FAdm.guide.lessMini=false;
FAdm.guide.jumpQuery=-1;
FAdm.guide.stateFilter=false;
FAdm.guide.stateIndex=-1;
FAdm.guide.stateMax=-1;
FAdm.guide.stateMin=-1;
FAdm.guide.stateQuery=false;
FAdm.guide.styleImg=false;
FAdm.guide.xClm.live=false;
FAdm.guide.$mins=false;
FAdm.misc.local=true;
FAdm.ns.map=false;
FAdm.ns.reTemplate=false;
FAdm.ns.sCat=false;
FAdm.ns.sFile=false;
FAdm.ns.sTemplate=false;
FAdm.ns.sUser=false;
FAdm.opt.memory={env:"memory",typ:"number",val:FAdm.opt.keep};
FAdm.opt.lessMini={env:"lessMini",typ:"boolean",val:FAdm.guide.lessMini};
FAdm.opt.multiWin={env:"multiWin",typ:"boolean",val:FAdm.wins.lot};
FAdm.opt.watchQ={env:"watchQ",typ:"choice",val:FAdm.batch.watchQ};
FAdm.opt.watchT={env:"watchT",typ:"choice",val:FAdm.batch.watchT};
FAdm.queer.stuck=false;
FAdm.str.action=false;
FAdm.str.artPath=false;
FAdm.str.script="javascript:";
FAdm.str.call=FAdm.str.script+FAdm.obj+"."+FAdm.type+".";
FAdm.str.page.content=false;
FAdm.str.page.id=false;
FAdm.str.page.name=false;
FAdm.str.page.rvtime=false;
FAdm.str.page.title=false;
FAdm.str.page.urlEnc=false;
FAdm.trans.bot.commons=false;
FAdm.trans.bot.discard=false;
FAdm.trans.bot.post=false;
FAdm.trans.bot.queue=false;
FAdm.trans.bot.rvtime=false;
FAdm.trans.bot.update=false;
FAdm.trans.bot.$xSave=false;
FAdm.users.i=false;
FAdm.users.n=false;
FAdm.users.w=false;
FAdm.wins.single="fileSingle";
FAdm.wins.toolOut="fileTools";
};
};
mediaWiki.libs.fileAdm.bb.all(mediaWiki.libs.fileAdm,mediaWiki);
delete mediaWiki.libs.fileAdm.bb.all;
mediaWiki.libs.fileAdm.bb.batch=function(FAdm,mw){
"use strict";
if(typeof FAdm.batch!=="object"){
FAdm.batch={};}
FAdm.batch.failed=function(about){
var style="color: #FF0000; border: solid 2px; width: auto; padding: 5px; margin-top: 10px;";
var $box=jQuery("<div />");
var $head=jQuery("<strong />");
$head.text(about);
$box.append($head);
$box.attr("style",style);
FAdm.misc.message($box,"fileAdmError",true);
};
FAdm.batch.failure=function(e,jqXHR,settings,thrown){
mw.log(FAdm.debugging,".batch.failure() "+settings,3,jqXHR);
FAdm.batch.failed();
};
FAdm.batch.faith=function(){
var style="color: #7B68EE; border: solid 2px; width: auto; padding: 5px; margin-top: 10px; height: 40px;";
var $box=jQuery("<div />");
var $head=jQuery("<strong />");
var $img=jQuery("<img />");
$img.attr("height","40");
$img.attr("src",FAdm.batch.clock);
$box.append($img);
$head.text("... "+FAdm.batch.sayActive+" ...");
$box.append($head);
$box.attr("style",style);
FAdm.misc.message($box,"fileAdmAPI",true);
};
FAdm.batch.feed=function(action){
var query;
if(!FAdm.batch.api){
FAdm.batch.api=mw.util.wikiScript("api");}
if(!FAdm.str.page.name){
FAdm.str.page.name=mw.config.get("wgPageName");}
if(!FAdm.str.page.id){
if(typeof(FAdm.misc.pageid)!=="number"){
FAdm.misc.pageid=mw.config.get("wgArticleId");}
FAdm.str.page.id=FAdm.str.fromNum(FAdm.misc.pageid);}
query={action:"query",prop:"revisions",rvprop:"content|timestamp",rvlimit:1,format:"json",titles:FAdm.str.page.name};
jQuery.getJSON(FAdm.batch.api,query,function(arrived){
var got=arrived.query;
if(got){
got=got.pages[FAdm.str.page.id];
if(got){
got=got.revisions["0"];}}
if(got){
FAdm.str.page.content=got["*"];
FAdm.str.page.rvtime=got.timestamp;
FAdm.batch.rvtime=FAdm.str.page.rvtime;
if(FAdm.str.page.content){
FAdm.batch.force(false,action);
}else{
got=false;}}
if(got){
if(FAdm.ns.is===FAdm.ns.nFile){
FAdm.trans.bot.feeder();}
}else{
FAdm.batch.failed(FAdm.batch.sayNoText);}
});
};
FAdm.batch.fetch=function(access,action){
var query={action:"query",prop:"revisions",rvprop:"content|timestamp",rvlimit:1,indexpageids:true,titles:access,format:"json"};
if(!FAdm.batch.api){
FAdm.batch.api=mw.util.wikiScript("api");}
jQuery.getJSON(FAdm.batch.api,query,action);
};
FAdm.batch.fine=function(arrived,about,answer){
var state="HTTP error";
var style;
var $box;
var $head;
var $info;
var $link;
if(answer){
if(answer.status===200){
if(arrived.indexOf("newtimestamp=")>0){
state=false;
}else{
state=false;}
}else{
state=state+" "+answer.status;}}
if(state){
FAdm.batch.failed(state);
}else{
style="color: #007000; border: solid 2px; width: auto; padding: 5px; margin-top: 10px;";
$box=jQuery("<div />");
$head=jQuery("<strong />");
$info=jQuery("<p />");
$link=jQuery("<a />");
$head.text(FAdm.batch.sayModified);
$box.append($head);
$link.text(FAdm.batch.sayCurrentVsn);
$link.attr("href",mw.util.wikiGetlink(FAdm.str.page.name));
$info.append($link);
$box.append($info);
$box.attr("style",style);
FAdm.misc.message($box,"fileAdmDone",true);}
};
FAdm.batch.flash=function(action,await){
if(await){
FAdm.batch.faith();}
FAdm.batch.feed(action);
};
FAdm.batch.force=function(adjust,action){
var change=false;
var doit;
var wl;
if(adjust){
change=adjust;
}else{
change=FAdm.str.page.content;}
if(action&&change){
change=action(change);}
if(!FAdm.batch.page){
if(!FAdm.str.page.name){
FAdm.str.page.name=mw.config.get("wgPageName");}
FAdm.batch.page=FAdm.str.page.name;}
if(!FAdm.batch.rvtime){
FAdm.batch.rvtime=FAdm.str.page.rvtime;}
if(change){
wl=(FAdm.batch.watch?FAdm.batch.watch:"preferences");
doit={action:"edit",token:mw.user.tokens.get("editToken"),title:FAdm.batch.page,text:change[0],summary:change[1]+" * "+FAdm.batch.selfSign+" fileAdm "+FAdm.vsn,watchlist:wl,minor:change[2],basetimestamp:FAdm.batch.rvtime,nocreate:true};
jQuery.post(FAdm.batch.api,doit,FAdm.batch.fine);
}else{
FAdm.batch.failed(FAdm.batch.sayNothing2do);}
};
};
mediaWiki.libs.fileAdm.bb.batch(mediaWiki.libs.fileAdm,mediaWiki);
delete mediaWiki.libs.fileAdm.bb.batch;
mediaWiki.libs.fileAdm.bb.cat=function(FAdm,mw){
"use strict";
if(typeof FAdm.cat!=="object"){
FAdm.cat={};}
FAdm.cat.action=function(){
var say;
var $t;
if(!FAdm.str.action){
FAdm.str.action=mw.config.get("wgAction");}
switch(FAdm.str.action){
case "view":
$t=jQuery(FAdm.cat.selTemplate);
FAdm.guide.fill();
if(!$t.length){
if(!FAdm.cat.fenced(false)){
say="<div class='error' style='border: solid 1px; width: auto; margin-top: 10px'>"+FAdm.cat.sayNoTemplate+": "+FAdm.cat.stamp+"</div>";
FAdm.misc.message(say,"fileAdmNoTemplate",true);}}
FAdm.cat.find(true);
break;
case "edit":
FAdm.cat.format();
break;}
return void(0);
};
FAdm.cat.family=function(ask){
var gcs;
var r=0;
if(ask===FAdm.cat.hidden){
r=-1;
}else if(FAdm.cat.regexpMaintain){
if(FAdm.cat.regexpMaintain.test(ask)){
r=-1;}}
if(!r){
gcs=FAdm.guide.cats;
r=-1;
if(FAdm.guide.fulfil(ask,gcs.checking)){
}else if(FAdm.guide.fulfil(ask,gcs.review0)){
}else if(FAdm.guide.fulfil(ask,gcs.review1)){
}else if(FAdm.guide.fulfil(ask,gcs.review2)){
}else if(FAdm.guide.fulfil(ask,gcs.license)){
}else if(FAdm.guide.fulfil(ask,gcs.transfer)){
}else if(FAdm.guide.fulfil(ask,gcs.transfix)){
}else if(FAdm.guide.fulfil(ask,gcs.transit)){
}else if(FAdm.guide.fulfil(ask,gcs.transmit)){
}else if(FAdm.guide.fulfil(ask,gcs.trash)){
}else{
r=0;}}
if(!r){
if(FAdm.cat.start){
if(ask.indexOf(FAdm.cat.start)===0){
r=1;}}}
return r;
};
FAdm.cat.fenced=function(area){
var i,k;
var r=false;
var re=false;
var $g;
if(!FAdm.ns.sCat){
FAdm.ns.sCat=FAdm.ns.fetch(FAdm.ns.nCat);}
if(area){
if(FAdm.cat.reMaintain){
re="\\[\\[ *"+FAdm.ns.sCat+": *"+FAdm.cat.reMaintain+" *(\\||]])";
re=new RegExp(re);
r=re.test(area);}
}else{
$g=jQuery(FAdm.guide.selTemplate);
if($g.length){
r=true;
}else{
if(!FAdm.file.cats){
FAdm.file.cats=mw.config.get("wgCategories");}
FAdm.guide.furnish();
if(!FAdm.cat.regexpMaintain){
if(FAdm.cat.reMaintain){
FAdm.cat.regexpMaintain=new RegExp(FAdm.cat.reMaintain);}}
for(i=0;i<FAdm.file.cats.length;i++){
k=FAdm.cat.family(FAdm.file.cats[i]);
if(k<0){
r=true;
break;}}}}
return r;
};
FAdm.cat.file=function(apply){
var i,k;
var r=false;
var re;
var s;
if(!FAdm.ns.sCat){
FAdm.ns.sCat=FAdm.ns.fetch(FAdm.ns.nCat);}
if(!FAdm.str.action){
FAdm.str.action=mw.config.get("wgAction");}
switch(FAdm.str.action){
case "view":
if(!FAdm.cat.regexpMaintain){
if(FAdm.cat.reMaintain){
FAdm.cat.regexpMaintain=new RegExp(FAdm.cat.reMaintain);}}
if(!FAdm.file.cats){
FAdm.file.cats=mw.config.get("wgCategories");}
for(i=0;i<FAdm.file.cats.length;i++){
k=FAdm.cat.family(FAdm.file.cats[i]);
if(k>0){
r=true;
break;}}
break;
case "edit":
case "submit":
if(FAdm.cat.start){
re="\\[\\[ *"+FAdm.ns.sCat+": *"+FAdm.cat.start;
if(apply){
s=apply;
}else{
s=FAdm.edit.field(false);}
re=new RegExp(re);
r=(re.test(s));}
break;}
return r;
};
FAdm.cat.find=function(){
var s="http://toolserver.org/~magnus/catscan_rewrite.php?language=de&ns%5B6%5D=1&doit=1&categories=";
var tool={target:false};
if(!FAdm.str.page.title){
FAdm.str.page.title=mw.config.get("wgTitle");}
s=s+mw.util.wikiUrlencode(FAdm.str.page.title);
FAdm.wins.forwardMode();
if(FAdm.wins.lot){
tool.target=FAdm.wins.toolOut;}
if(!this.tools){
this.tools=[false,false,false,false];}
tool.href=s+"&templates_no=Gepr%C3%BCfte+Datei";
tool.title="Ungeprüft";
tool.id="ca-filereview0";
tool.hint="Ungeprüfte Dateien";
tool.hotkey="0";
this.tools[0]=FAdm.portlet.factory(tool);
tool.href=s+"%0D%0ADatei%3AZweitpr%C3%BCfung+ausstehend";
tool.title="1x geprüft";
tool.id="ca-filereview1";
tool.hint="Erst einmal geprüfte Dateien";
tool.hotkey="1";
this.tools[1]=FAdm.portlet.factory(tool);
tool.href=s+"%0D%0ADatei%3Agepr%C3%BCfte+Datei";
tool.title="2x geprüft";
tool.id="ca-filereview2";
tool.hint="Zweimal geprüfte Dateien";
tool.hotkey="2";
this.tools[2]=FAdm.portlet.factory(tool);
tool.href=s+"&negcats=Datei%3ANoCommons";
tool.title="ohne NoCommons";
tool.id="ca-filereviewN";
tool.hint="Dateien ohne 'NoCommons'";
tool.hotkey="N";
this.tools[3]=FAdm.portlet.factory(tool);
};
FAdm.cat.flip=function(){
var domA;
var i;
if(this.tools){
for(i=0;i<this.tools.length;i++){
domA=this.tools[i].dom;
if(FAdm.wins.lot){
domA.setAttribute("target",FAdm.wins.toolOut);
}else{
domA.removeAttribute("target");}}}
};
FAdm.cat.format=function(){
var got;
var lazy;
var lock;
var re;
var scope=FAdm.edit.field(false);
var shift;
var swap;
if(typeof(scope)==="string"){
lock=this.fenced(scope);
lazy=lock;
re=new RegExp("({{ *"+this.stamp+" *(\\| *([^}]*))? *}} *\n?)","i");
shift=scope.replace(/\t/g," ");
swap="{{"+this.stamp;
got=re.exec(shift);
if(got!==null){
if(got[3]){
swap=swap+"|"+got[3];
lazy=true;}
shift=shift.replace(re,"\n");}
if(lock){
swap="";
}else{
swap=swap+"}}";}
got=FAdm.edit.formatPageTail(shift);
shift=got[0]+(got[0].length&&got[1].length?"\n\n":"")+got[1];
shift=swap+(shift.length?"\n\n":"")+shift;
if(!lazy){
re=new RegExp(this.reNoParSuggest);
if(!FAdm.str.page.title){
FAdm.str.page.title=mw.config.get("wgTitle");}
swap=FAdm.str.page.title.substr(this.start.length);
if(!re.test(swap)){
shift="{{"+this.stamp+"|"+swap+shift.substr(this.stamp.length+2);}}
if(shift!==scope){
FAdm.edit.field(shift);}}
};
};
mediaWiki.libs.fileAdm.bb.cat(mediaWiki.libs.fileAdm,mediaWiki);
delete mediaWiki.libs.fileAdm.bb.cat;
mediaWiki.libs.fileAdm.bb.edit=function(FAdm){
"use strict";
if(typeof FAdm.edit!=="object"){
FAdm.edit={template:{}};}
if(typeof FAdm.edit.template!=="object"){
FAdm.edit.template={};}
FAdm.edit.fetchRegexp=function(ask){
var r=ask.replace(/([.*+?(|){}\^$\x5B])/g,"\\$1");
var s=r.substr(0,1);
var sL=s.toLowerCase();
var sU=s.toUpperCase();
r=r.replace(/_/g," ").replace(/+/g," ");
r=r.replace(/ /g,"[ _]+");
if(sL!==sU){
r="["+sL+sU+"]"+r.substr(1);}
return r;
};
FAdm.edit.field=function(alter){
var r=false;
if(!FAdm.ia){
this.form();
if(FAdm.ia){
if(typeof(window.wikEd)==="object"){
if(window.wikEd!==null){
if(typeof(window.wikEd.disabled)!=="boolean"){
if(typeof window.wikEd.Setup==="function"){
window.wikEd.Setup();}}
if(typeof(window.wikEd.disabled)==="boolean"){
if(!window.wikEd.disabled){
FAdm.ia.editor="wikEd";}}}}}}
if(typeof(FAdm.ia)==="object"){
if(typeof(alter)==="string"){
FAdm.ia.$textarea.val(alter);
switch(FAdm.ia.editor){
case "wikEd":
window.wikEd.UpdateFrame(null);
break;}
}else{
switch(FAdm.ia.editor){
case "wikEd":
window.wikEd.UpdateTextarea(null);
break;}
FAdm.str.page.content=FAdm.ia.$textarea.val();
r=FAdm.str.page.content;}}
return r;
};
FAdm.edit.finalize=function(after){
var $field;
var look;
var looking;
var setting;
var summary;
if(after){
FAdm.str.page.content=after[0];
this.field(FAdm.str.page.content);
$field=FAdm.ia.$editform.find("#wpSummary");
if($field.length){
summary=$field.val();
if(typeof(summary)==="string"){
summary=FAdm.str.trimLeft(summary);
}else{
summary="";}
if(after[1]){
if(summary.length){
if(summary.indexOf(after[1])<0){
if(after[2]){
summary=summary+", "+after[1];
}else{
summary=after[1]+", "+summary;}}
}else{
summary=after[1];}}
$field.val(summary);
if(typeof(after[4])==="string"){
setting=after[4];
if(setting==="watch"){
look=true;
}else if(setting==="unwatch"){
look=false;
}else{
setting=false;}
if(setting){
$field=FAdm.ia.$editform.find("#wpWatchthis");
if($field.length){
looking=$field.prop("checked");
if(looking!==look){
if(look){
$field.attr("checked");
}else{
$field.attr("checked",null);}}}}}}}
};
FAdm.edit.find=function(ask,apply){
var got;
var r=false;
var re;
var s;
var see;
see=(apply?apply:this.field(false));
if(see){
re=this.template.fetchRE(ask,false)+"[^}]*}}";
re=new RegExp(re);
got=re.exec(see);
if(got){
s=see.replace(re,"");
s=FAdm.str.trimRight(FAdm.str.trimLeft(s));
s=s.replace(/\n\n\n+/g,"\n\n");
r=[got[0],s];}}
return r;
};
FAdm.edit.fold=function(adjust,ask,assign,align){
var got;
var k;
var n;
var r=false;
var re="("+this.template.fetchRE(ask,false)+")(\\|[ \t\n]*([^}]+:[^}]+({{!}})?[^}]+)*)*[ \t\n]*}}[ \t]*\n*";
var shift;
var story;
var stub;
var swap;
re=new RegExp(re);
got=re.exec(adjust);
if(got!==null){
k=got[1].length;
n=got[0].length;
shift=adjust.substr(got.index,n);
story=shift.substr(k);
stub=adjust.substr(0,got.index)+adjust.substr(got.index+n);
swap=false;
swap="{{"+ask;
stub=FAdm.str.trimLeft(FAdm.str.trimRight(stub));
if(story.charCodeAt(0)===124){
story=FAdm.str.trimRight(story);
story=story.substr(0,story.length-2);
story=this.formatUserLink(story);
swap=swap+story;
}else{
story=false;}
swap=swap+"}}";
if(assign){
if(align){
shift=swap+"\n\n"+stub;
}else{
shift=stub+"\n\n"+swap;}}
r=[shift,swap,story,stub];}
return r;
};
FAdm.edit.form=function(){
var $box;
var $form;
if(!FAdm.ia){
$form=jQuery("#editform");
if($form.length){
$box=jQuery("#wpTextbox1");
if($box.length){
if(!$box.attr("readonly")){
FAdm.ia={$editform:$form,$textarea:$box,editor:false};}}}}
};
FAdm.edit.formatPageTail=function(adjust){
var got;
var re;
var seek="Category";
var start=FAdm.str.trimRight(FAdm.str.trimLeft(adjust));
var swap="";
start=start.replace(/\t/g," ");
start=start.replace(/\{\{+/g,"{{");
start=start.replace(/\[\[+/g,"[[");
re="{{(DEFAULTSORTKEY|DEFAULTCATEGORYSORT|DEFAULTSORT) *:";
re=new RegExp(re,"gi");
start=start.replace(re,"{{DEFAULTSORT:");
re=" *{{(DEFAULTSORT";
if(this.defaultsort){
if(this.defaultsort!=="DEFAULTSORT"){
re=re+"|"+this.defaultsort;}}
re=re+") *:([^}\n]*}}) *\n?";
re=new RegExp(re,"i");
got=re.exec(start);
if(got!==null){
swap="{{"+this.defaultsort+":"+got[2];
start=start.replace(re,"");}
if(!FAdm.ns.sCat){
FAdm.ns.sCat=FAdm.ns.fetch(FAdm.ns.nCat);}
if(FAdm.ns.sCat!==seek){
seek=seek+"|"+FAdm.ns.sCat;}
seek="\\[\\[ *("+seek+"): *(.+) *\\]\\] *\n?";
re=new RegExp(seek,"i");
got=re.exec(start);
while(got){
if(swap){
swap=swap+"\n";}
swap=swap+"[["+FAdm.ns.sCat+":"+got[2]+"]]";
start=start.substr(0,got.index)+start.substr(got.index+got[0].length);
got=re.exec(start);}
swap=FAdm.str.trimRight(swap);
FAdm.edit.sisters="";
re="\n? *\\[\\[([a-z][a-z][-a-z]*):([^|\n]+)\\]\\] *(\n)?";
re=new RegExp(re,"ig");
start=FAdm.str.trimRight(start);
start=start.replace(re,this.foundIW);
if(FAdm.edit.sisters){
swap=swap+"\n"+FAdm.edit.sisters;
start=FAdm.str.trimRight(start);}
start=start.replace(/\n+\n/g,"\n\n");
start=start.replace(/\n\n\n/g,"\n\n");
return[start,swap];
};
FAdm.edit.formatUserLink=function(adjust){
var i,j,k,re,signed,story=FAdm.users.fair(adjust),start="[["+FAdm.ns.sUser+":";
re=new RegExp("(\\[\\["+FAdm.ns.sUser+":[^{[]+){{!}}","g");
story=story.replace(re,"$1|");
k=story.indexOf(start);
if(k>=0){
k+=start.length;
i=story.indexOf("|",k);
j=story.indexOf("]]",k);
if(j>k){
start=story.substr(0,k);
j=(i>k&&i<j?i:j);
signed=story.slice(k,j);
story=story.substr(j);
signed=FAdm.str.trimRight(FAdm.str.trimLeft(signed));
signed=decodeURIComponent(signed);
story=start+signed+story;}}
return story;
};
FAdm.edit.foundIW=function(all,aim,assign,after){
var r=all;
var s;
if(!FAdm.lang.flop(aim)){
if(assign.indexOf("]")<0){
s=FAdm.str.trimRight(FAdm.str.trimLeft(assign));
if(s){
FAdm.edit.sisters=FAdm.edit.sisters+"\n[["+aim.toLowerCase()+":"+s+"]]";
r=(after?"\n":"");}}}
return r;
};
FAdm.edit.template.fetchParameter=function(achieve,access){
var got;
var r=false;
var re="\\|[ \t\n]*"+access+"[ \t\n]*=([^|}]*)[|}]";
re=new RegExp(re);
got=re.exec(achieve);
if(got===null){
if(typeof(access)==="number"){
got=achieve.split("|");
if(got.length>=access){
r=got[access];
if(typeof(r)==="string"){
r=r.replace(/\}\}$/,"");}}}
}else{
r=got[1];}
if(typeof(r)==="string"){
r=FAdm.str.trimRight(FAdm.str.trimLeft(r));}
return r;
};
FAdm.edit.template.fetchRE=function(ask,around){
var i;
var r;
var s;
if(typeof(ask)==="object"){
r="(";
for(i=0;i<ask.length;i++){
r=r+(i?"|":"")+FAdm.edit.fetchRegexp(ask[i]);}
r=r+")";
}else{
r=FAdm.edit.fetchRegexp(ask);}
if(!FAdm.ns.reTemplate){
if(!FAdm.ns.sTemplate){
FAdm.ns.sTemplate=FAdm.ns.fetch(FAdm.ns.nTemplate);}
if(FAdm.ns.sTemplate.toLowerCase()==="template"){
FAdm.ns.reTemplate="[tT]emplate";
}else{
s=FAdm.ns.sTemplate.substr(0,1);
FAdm.ns.reTemplate="(?:[tT]emplate|["+s.toLowerCase()+s.toUpperCase()+"]"+FAdm.ns.sTemplate.substr(1)+")";}}
r="{{[ \t\n]*(?:"+FAdm.ns.reTemplate+":[ \t\n]*)?"+r;
r=r+"[ \t\n]*";
if(around){
r=r+"(?:}}|\\|)";}
return r;
};
};
mediaWiki.libs.fileAdm.bb.edit(mediaWiki.libs.fileAdm);
delete mediaWiki.libs.fileAdm.bb.edit;
mediaWiki.libs.fileAdm.bb.file=function(FAdm,mw){
"use strict";
if(typeof FAdm.file!=="object"){
FAdm.file={};}
FAdm.file.action=function(){
var further=false;
var insider=-2;
var label=false;
var later=false;
var lazy;
var legal=true;
var live=false;
var lock=true;
var sub=false;
var select;
var spool;
var story;
var template;
if(!FAdm.str.action){
FAdm.str.action=mw.config.get("wgAction");}
switch(FAdm.str.action){
case "view":
if(!mw.util.getParamValue("diff")){
label=true;}
break;
case "submit":
later=true;
case "edit":
live=true;
break;
default:
lock=false;}
if(label){
if(!FAdm.file.cats){
FAdm.file.cats=mw.config.get("wgCategories");}
FAdm.guide.furnish();
FAdm.guide.fancy(FAdm.file.cats,false);
sub=FAdm.file.type.substr(0,1).toUpperCase();
switch(sub){
case "C":
if(FAdm.file.type!=="category"){
further=FAdm.queer.features;
insider=0;
legal=true;
lock=false;
FAdm.queer.fetch(1,false);}
break;
case "R":
if(!FAdm.trans.flop(false)){
insider=FAdm.users.r;
further=FAdm.review.features;}
break;
case "F":
case "T":
if(FAdm.users.fidelity()){
insider=0;
legal=true;
}else{
insider=FAdm.users.t;
legal=false;}
further=FAdm.trans.features;
break;}}
if(live){
lazy=false;
select=false;
spool=false;
story=false;
spool=mw.util.getParamValue("fileAdm");
if(typeof(spool)==="string"){
if(spool.indexOf("questionable")===0){
FAdm.queer.fetch(2,spool);
select=spool;
lazy=true;
lock=false;
}else if(spool==="approve"){
select=spool;}
}else{
spool=false;}
if(!lazy){
story=FAdm.edit.field(false);
template=FAdm.edit.find(FAdm.queer.stamp,story);
if(template){
FAdm.queer.fetch(3,template[0]);
lock=false;}}
template=FAdm.edit.find(FAdm.queer.stampNotified,story);
if(template){
FAdm.queer.fetch(4,template[0]);
lock=false;}
if(lock){
if(FAdm.users.fidelity()){
FAdm.trans.bot.find(true,false);
}else{
FAdm.users.friend("T",FAdm.users.t,FAdm.trans.bot.find);}
if(!select){
if(spool){
select=spool;
sub=true;
}else if(FAdm.edit.find(FAdm.trans.stamp,story)){
sub=true;}
if(!sub){
if(!FAdm.file.foreign()){
insider=FAdm.users.r;
further=FAdm.review.features;
sub="R";}}}
}else{
further=FAdm.queer.features;
insider=0;
label=true;
legal=true;}
FAdm.file.first(select);}
if(further){
if(insider){
if(insider>0){
FAdm.users.friend(sub,insider,further);}
}else if(label){
further(legal,true);}}
if(lock){
FAdm.queer.link.click="queer.features(true,true)";
FAdm.queer.link.id="ca-queer";
FAdm.portlet.factory(FAdm.queer.link);}
return void(0);
};
FAdm.file.fire=function(action){
var skin=mw.util.getParamValue("useskin");
var start=mw.config.get("wgServer")+mw.config.get("wgScript")+"?title=";
if(!FAdm.str.page.urlEnc){
if(!FAdm.str.page.name){
FAdm.str.page.name=mw.config.get("wgPageName");}
FAdm.str.page.urlEnc=mw.util.wikiUrlencode(FAdm.str.page.name);}
start=start+FAdm.str.page.urlEnc+"&action=edit&fileAdm="+action;
if(skin){
start=start+"&useskin="+skin;}
document.location.href=start;
};
FAdm.file.first=function(action){
var change;
var lazy;
var s;
FAdm.edit.field(false);
if(typeof(FAdm.str.page.content)==="string"){
change=false;
lazy=true;
switch(action){
case false:
break;
case "approve":
change=FAdm.review.format(FAdm.str.page.content,true);
lazy=false;
break;
case "transfer":
change=FAdm.trans.format(true);
lazy=false;
break;
default:
if(typeof(action)==="string"){
if(action.indexOf("questionable")===0){
s=action.substr(12);
change=FAdm.queer.format(FAdm.str.page.content,(s?s:true));
lazy=false;}}}
if(lazy){
change=FAdm.file.format(FAdm.str.page.content);}
FAdm.edit.finalize(change);}
};
FAdm.file.foreign=function(){
var r;
var $elem=jQuery(this.selCommons);
r=($elem.length>0);
if(!r){
$elem=jQuery(this.selNowCommons);
r=($elem.length>0);}
return r;
};
FAdm.file.forge=function(arglist){
var suite;
var submit;
var $button;
var $flash;
var $head;
var $itemEdit;
var $linkEdit;
var $ul;
arglist.$box=jQuery("<div />");
if(arglist.$box){
if(typeof(arglist.id)==="string"){
arglist.$box.attr("id",arglist.id);}
if(typeof(arglist.style)==="string"){
arglist.$box.attr("style",arglist.style);}
if(typeof(arglist.subject)==="string"){
$head=jQuery("<strong />");
$head.text(arglist.subject);
arglist.$box.append($head);}
arglist.$content=jQuery("<div />");
arglist.$box.append(arglist.$content);
if(!FAdm.str.action){
FAdm.str.action=mw.config.get("wgAction");}
if(typeof(arglist.start)==="string"&&typeof(arglist.shift)==="string"){
switch(FAdm.str.action){
case "view":
FAdm.file.mode=1;
break;
case "edit":
case "submit":
FAdm.file.mode=2;
break;
default:
FAdm.file.mode=0;}}
if(FAdm.file.mode){
suite=false;
$linkEdit=jQuery("<a />");
$button=false;
if(FAdm.file.mode===1){
if(typeof(arglist.soft)==="string"){
suite=arglist.start;
$linkEdit.text(arglist.soft);}
if(typeof(arglist.submit)==="string"){
submit=FAdm.str.call+arglist.submit+";void(0);";
$flash=jQuery("<a />");
$flash.text(arglist.shift);
$flash.attr("href",submit);
$flash.attr("style",FAdm.batch.styleButton);
$button=jQuery("<p />");
$button.append($flash);}
}else if(FAdm.file.mode===2){
suite=arglist.splash;
$linkEdit.text(arglist.shift);}
if(suite){
$ul=jQuery("<ul />");
$itemEdit=jQuery("<li />");
$linkEdit.attr("href",FAdm.str.call+suite+";void(0);");
$itemEdit.append($linkEdit);
$ul.append($itemEdit);
arglist.$box.append($ul);}
if($button){
arglist.$box.append($button);}}}
};
FAdm.file.format=function(adjust){
var got;
var i;
var r=false;
var shift;
var start;
var summary;
got=FAdm.edit.formatPageTail(adjust);
shift=got[1];
start=got[0];
if(FAdm.file.replace){
for(i=0;i<FAdm.file.replace.length;i++){
if(typeof(FAdm.file.replace[i][0])==="string"){
FAdm.file.replace[i][0]=new RegExp(FAdm.file.replace[i][0],"g");}
start=start.replace(FAdm.file.replace[i][0],FAdm.file.replace[i][1]);}}
got=FAdm.edit.fold(start,FAdm.review.stamp,true,false);
if(got){
start=got[0];}
if(start.length&&shift.length){
start=start+"\n\n";}
shift=start+shift+"\n";
if(shift!==adjust){
summary=false;
if(FAdm.str.trimRight(shift)!==FAdm.str.trimRight(adjust)){
summary=FAdm.edit.summary0;}
r=[shift,summary,true];}
return r;
};
};
mediaWiki.libs.fileAdm.bb.file(mediaWiki.libs.fileAdm,mediaWiki);
delete mediaWiki.libs.fileAdm.bb.file;
mediaWiki.libs.fileAdm.bb.guide=function(FAdm,mw,$){
"use strict";
if(typeof FAdm.guide!=="object"){
FAdm.guide={xClm:{}};}
if(typeof FAdm.guide.xClm!=="object"){
FAdm.guide.xClm={};}
FAdm.guide.action=function(){
var $guide;
var listed=false;
switch(FAdm.ns.is){
case FAdm.ns.nSpecial:
listed=true;
break;
case FAdm.ns.nProject:
if(typeof(FAdm.misc.pageid)!=="number"){
FAdm.misc.pageid=mw.config.get("wgArticleId");}
if(FAdm.misc.pageid===FAdm.opt.page.id){
FAdm.opt.page.form();
break;}
case FAdm.ns.nOthers1:
$guide=jQuery(FAdm.guide.selTemplate);
listed=($guide.length>0);
break;}
if(listed){
FAdm.guide.fill();}
return void(0);
};
FAdm.guide.fancy=function(assigned,adhere){
var gcs=FAdm.guide.cats;
var i;
var license=false;
var r=["unknown",gcs.none];
var s;
var shift=false;
var shifting=false;
var snow=false;
var stack=false;
var start=false;
var stuck=false;
var succeed1=false;
var succeed2=false;
var suspect=false;
var swap=false;
if(!adhere){
if(!FAdm.ns.sCat){
FAdm.ns.sCat=FAdm.ns.fetch(FAdm.ns.nCat);}
start=FAdm.ns.sCat+":";}
for(i=0;i<assigned.length;i++){
s=assigned[i];
if(adhere){
s=s.title;
}else{
s=start+s;}
if(!license){
license=FAdm.guide.fulfil(s,gcs.license);}
if(!suspect){
suspect=FAdm.guide.fulfil(s,gcs.checking);}
if(!suspect){
if(!shift){
shift=FAdm.guide.fulfil(s,gcs.transfer);}
if(!shifting){
shifting=FAdm.guide.fulfil(s,gcs.transfix);}
if(!snow){
snow=FAdm.guide.fulfil(s,gcs.trash);}
if(!stack){
stack=FAdm.guide.fulfil(s,gcs.transmit);}
if(!swap){
swap=FAdm.guide.fulfil(s,gcs.transit);}
if(!stuck){
stuck=FAdm.guide.fulfil(s,gcs.review0);}
if(!(succeed1||succeed2)){
succeed1=FAdm.guide.fulfil(s,gcs.review1);
succeed2=FAdm.guide.fulfil(s,gcs.review2);}}}
if(suspect){
if(license){
r=["checkX",gcs.checkX];
}else{
r=["checking",suspect];}
}else if(stuck||succeed1||succeed2){
if(snow){
r=["trash",snow];
}else if(shifting||stack||swap){
r=["transnot",gcs.transnot];
}else if(succeed2){
r=["review2",succeed2];
}else if(succeed1){
r=["review1",succeed1];
}else{
r=["review0",stuck];}
}else if(license){
if(shift||shifting||snow||stack||swap){
if(snow){
r=["trash",snow];
}else if(shifting){
r=["transfix",shifting];
}else if(swap){
r=["transit",swap];
}else{
r=["transfer",shift];}
}else{
r=["free",gcs.license[2]];}}
FAdm.file.type=r[0];
return r;
};
FAdm.guide.fetch=function(event,XMLHttpRequest,ajaxOptions){
var k;
var m;
var n;
var s;
var set;
if(!FAdm.guide.stateQuery){
if(!FAdm.ns.sFile){
FAdm.ns.sFile=FAdm.ns.fetch(FAdm.ns.nFile);}
if(!FAdm.str.artPath){
FAdm.str.artPath=mw.config.get("wgArticlePath");
FAdm.str.artPath=FAdm.str.artPath.replace(/\$1/,"");}
FAdm.guide.stateFilter=FAdm.str.artPath+FAdm.ns.sFile+":";
FAdm.guide.stateQuery={action:"query",prop:"categories",cllimit:500,indexpageids:true,format:"json",titles:false};
FAdm.guide.stateIndex=0;
FAdm.guide.jumpQuery=FAdm.guide.multiQuery;
if(!FAdm.batch.api){
FAdm.batch.api=mw.util.wikiScript("api");}
if(typeof(FAdm.batch.reBlacklist)==="string"){
FAdm.batch.reBlacklist=new RegExp("("+FAdm.batch.reBlacklist+")","gi");}
jQuery(document).ajaxError(FAdm.batch.failure);}
if(FAdm.guide.stateIndex>=document.links.length){
FAdm.guide.stateIndex=0;
FAdm.guide.jumpQuery=FAdm.guide.multiQuery;
if(FAdm.guide.xClm.live){
FAdm.guide.xClm.portlet.removeAttribute("style");
FAdm.guide.xClm.live=false;}
}else{
m=0;
n=FAdm.str.artPath.length;
set=false;
if(FAdm.guide.jumpQuery>FAdm.batch.maxTitles){
FAdm.guide.jumpQuery=FAdm.batch.maxTitles;}
for(true;
FAdm.guide.stateIndex<document.links.length;
FAdm.guide.stateIndex++){
s=document.links[FAdm.guide.stateIndex].pathname;
k=s.indexOf(FAdm.guide.stateFilter);
if(k>=0){
FAdm.guide.stateIndex++;
s=decodeURIComponent(s.substr(n));
s=s.replace(FAdm.batch.reBlacklist,".BLACKLIST.");
if(set){
set=set+"|"+s;
}else{
set=s;
FAdm.guide.stateMin=FAdm.guide.stateIndex;}
m++;
if(m===FAdm.guide.jumpQuery){
break;}}}
if(set){
FAdm.guide.stateQuery.titles=set;
if(FAdm.guide.stateIndex<document.links.length){
FAdm.guide.stateIndex++;}
FAdm.guide.stateMax=FAdm.guide.stateIndex;
jQuery.getJSON(FAdm.batch.api,FAdm.guide.stateQuery,FAdm.guide.found);}
FAdm.guide.jumpQuery+=FAdm.guide.jumpQuery;}
};
FAdm.guide.fill=function(){
var elem;
FAdm.guide.toggleImg.name="MinImg";
FAdm.guide.toggleImg.script="guide.flipImage";
if(FAdm.opt.factory(FAdm.guide.toggleImg)){
FAdm.guide.lessMini=FAdm.opt.fetch(FAdm.opt.lessMini);
FAdm.guide.flipImage(FAdm.guide.lessMini);
if(FAdm.guide.$mins.length){
FAdm.guide.linkState.click="guide.fetch()";
FAdm.guide.linkState.id="ca-guide-state";
FAdm.portlet.factory(FAdm.guide.linkState);
FAdm.guide.toggleTgt.name="TgtWin";
FAdm.guide.toggleTgt.script="guide.flipTarget";
if(FAdm.opt.factory(FAdm.guide.toggleTgt)){
FAdm.portlet.flip(FAdm.guide.toggleTgt,FAdm.wins.lot);}
FAdm.wins.forwardSingle();
if(FAdm.ns.is===-1){
if(FAdm.str.page.scp==="Listfiles"){
FAdm.guide.xClm.click="guide.xClm.fill(true)";
FAdm.guide.xClm.id="ca-guide-column";
elem=FAdm.portlet.factory(FAdm.guide.xClm);
if(elem){
FAdm.guide.xClm.portlet.setAttribute("style","display:none");
FAdm.guide.xClm.live=true;}}}}}
};
FAdm.guide.flag=function(about,apply,assign){
var elem=false;
var i;
var ref;
var set;
var seek;
var select;
var style=FAdm.guide.cats.invalid;
var swap;
if(apply){
seek=FAdm.str.artPath+assign;
for(i=FAdm.guide.stateMin;
i<FAdm.guide.stateMax;
i++){
ref=document.links[i];
swap=decodeURI(ref.pathname).replace(/_/g," ");
if(unescape(swap)===seek){
elem=ref;
i++;
if(i<document.links.length){
ref=document.links[i];
swap=decodeURI(ref.pathname);
swap=swap.replace(/_/g," ");
if(unescape(swap)===seek){
elem=ref;}}
style=apply;
break;}}
}else{
elem=document.links[FAdm.guide.stateMin];}
if(elem){
elem.setAttribute("style",style);
if(about){
select="fileAdm_F_"+about;
set="class";
if(elem.hasAttribute(set)){
select=FAdm.str.trimRight(elem.getAttribute(set))+" "+select;}
elem.setAttribute(set,select);}}
};
FAdm.guide.flipImage=function(abolish){
var selector=".thumb";
var style;
if(FAdm.ns.is===-1){
if(FAdm.str.page.scp==="Listfiles"){
selector="a.image";}}
FAdm.guide.$mins=jQuery(selector);
if(FAdm.guide.$mins.length){
if(FAdm.guide.styleImg){
style=FAdm.guide.styleImg;
}else{
style=FAdm.guide.$mins.first().attr("style");
if(typeof(style)==="string"){
FAdm.guide.styleImg=style;
}else{
FAdm.guide.styleImg=true;}}
if(abolish){
style="display:none";}
if(typeof(style)==="string"){
FAdm.guide.$mins.attr("style",style);
}else{
FAdm.guide.$mins.removeAttr("style");}
FAdm.portlet.flip(FAdm.guide.toggleImg,abolish);
FAdm.opt.fetch(FAdm.opt.lessMini,abolish);
}else if(FAdm.guide.toggleImg.id){
jQuery("#"+FAdm.guide.toggleImg.id).css("display","none");}
};
FAdm.guide.flipTarget=function(appear){
FAdm.wins.lot=appear;
FAdm.portlet.flip(FAdm.guide.toggleTgt,FAdm.wins.lot);
FAdm.opt.fetch(FAdm.opt.multiWin,FAdm.wins.lot);
FAdm.wins.forwardSingle();
FAdm.cat.flip();
};
FAdm.guide.found=function(arrived){
var i;
var n;
var page;
var query=(typeof(arrived)==="object");
var sel;
var sid;
var style;
var type;
FAdm.guide.furnish();
if(query){
query=arrived.query;}
if(query){
n=query.pageids.length;
if(n){
for(i=0;i<n;i++){
sid=query.pageids[i];
if(sid.charCodeAt(0)===45){
FAdm.guide.flag(false,false);
}else{
sel=false;
style=false;
page=query.pages[sid];
if(typeof(page.categories)==="object"){
type=FAdm.guide.fancy(page.categories,true);
sel=type[0];
style=type[1];}
FAdm.guide.flag(sel,style,page.title);}}
}else{
FAdm.guide.flag(false,false);}
}else{
FAdm.guide.flag(false,false);}
FAdm.guide.fetch();
};
FAdm.guide.fulfil=function(about,aim){
var r=false;
switch(aim[1]){
case 0:
r=(about===aim[0]);
break;
case 1:
r=(about.indexOf(aim[0])===0);
break;
case 2:
r=aim[0].test(about);
break;}
if(r){
r=aim[2];}
return r;
};
FAdm.guide.furnish=function(){
var gcs=this.cats;
if(gcs.lazyRE){
gcs.lazyRE=false;
if(!FAdm.ns.sCat){
FAdm.ns.sCat=FAdm.ns.fetch(FAdm.ns.nCat);}
gcs.category=[FAdm.cat.start,1,gcs.category];
gcs.checking=this.furnisher(gcs.checking);
gcs.license=this.furnisher(gcs.license);
gcs.review0=this.furnisher(gcs.review0);
gcs.review1=this.furnisher(gcs.review1);
gcs.review2=this.furnisher(gcs.review2);
gcs.transfer=this.furnisher(gcs.transfer);
gcs.transit=this.furnisher(gcs.transit);
gcs.transmit=this.furnisher(gcs.transmit);
gcs.transfix=this.furnisher(gcs.transfix);
gcs.trash=this.furnisher(gcs.trash);}
};
FAdm.guide.furnisher=function(adjust){
var i;
var r=[adjust[0],0,adjust[1]];
var re;
switch(typeof(adjust[0])){
case "string":
if(FAdm.str.substrEnd(r[0],2)===".*"){
r[0]=r[0].substr(0,r[0].length-2);
r[1]=1;}
r[0]=FAdm.ns.sCat+":"+r[0];
break;
case "object":
re="^"+FAdm.ns.sCat+":(";   //// ns,escapeRegexp
for(i=0;i<r[0].length;i++){
if(i){
re=re+"|";}
re=re+r[0][i];}
re=re+")$";
r[0]=new RegExp(re);
r[1]=2;
break;}
return r;
};
FAdm.guide.further=function(advanced,assign){
if(assign){
FAdm.users.flag("R",advanced);}
};
FAdm.guide.xClm.fill=function(ahead){
var s;
var sort;
var xClm=this;
var $r;
var $tbl;
var $th;
if(ahead){
$tbl=jQuery(".TablePager");
if($tbl.length){
sort=$tbl.attr("class");
this.portlet.setAttribute("style","display:none");
$tbl.attr("class",sort+" sortable");
$r=jQuery(".TablePager > thead > tr");
if($r.length){
$r.children().each(function(){
$th=$(this);
sort=$th.attr("class")+" unsortable";
$th.attr("class",sort);
});
$th=jQuery("<th />");
if($th.length){
$th.text("*");
$th.attr("class","sortable");
$r.children().last().after($th);}}}}
$r=jQuery(".TablePager > tbody > tr");
if($r.length){
if(ahead){
s="<td class='TablePager_col_fileAdm'>";
$r.each(function(){$(this).children().last().after(s);
});}
$r.each(function(){xClm.td={$cell:false,$kids:$(this).children(),scope:false};
xClm.td.$kids.each(xClm.find);
xClm.furnish();
});}
if(this.td){
delete this.td;}
};
FAdm.guide.xClm.find=function(index,Element){
var s;
var xClm=FAdm.guide.xClm;
var $elem=jQuery(this);
switch($elem.attr("class")){
case "TablePager_col_img_name":
$elem=$elem.find("a");
if($elem.length){
s=$elem.attr("class");
if(typeof(s)==="string"){
if(s.indexOf("fileAdm_F_")===0){
xClm.td.scope=s.substr(10);}}}
break;
case "TablePager_col_fileAdm":
xClm.td.$cell=$elem;
break;}
};
FAdm.guide.xClm.furnish=function(){
var s;
if(this.td.$cell){
s=(this.td.scope?this.td.scope:"");
this.td.$cell.text(s);}
};
};
mediaWiki.libs.fileAdm.bb.guide(mediaWiki.libs.fileAdm,mediaWiki,jQuery);
delete mediaWiki.libs.fileAdm.bb.guide;
mediaWiki.libs.fileAdm.bb.lang=function(FAdm){
"use strict";
if(typeof FAdm.lang!=="object"){
FAdm.lang={};}
FAdm.lang.sc3="ace|als|ang|arc|ast|ast|bar|bcl|bjn|bpy|bug|bxr|cdo|ceb|cho|chr|chy|ckb|crh|csb|diq|dsb|eml|epo|ext|frp|frr|fur|gag|gan|glk|got|gsw|hak|haw|hif|hsb|ilo|jbo|kaa|kab|kbd|koi|krc|ksh|lad|lbe|lez|lij|lmo|ltg|lzh|mdf|mhr|mrj|mus|mwl|myv|mzn|nah|nan|nap|nds|new|nov|nrm|nso|pag|pam|pap|pcd|pdc|pfl|pih|pms|pnb|pnt|rmy|rue|scn|scn|sco|sgs|srn|stq|szl|tet|tpi|tum|udm|vec|vep|vls|vro|war|wuu|wuu|xal|xmf|yue|zea";
FAdm.lang.sre="[a-z][a-z][a-z]?|simple|[a-z][a-z][a-z]?-[a-z][a-z][-a-z]*";
FAdm.lang.flop=function(adjust){
var got;
var k;
var r;
var s=FAdm.str.trimLeft(adjust);
if(!this.re){
this.re=new RegExp("^("+this.sre+") *$","i");}
got=this.re.exec(s);
if(got){
r=s;
got=got[1];
s=got.toLowerCase();
k=got.length;
if(k===2){
if(s==="wp"){
r="WP";
}else if(this.isO_639_1(s)){
r=false;}
}else if(k===3){
if(s==="doi"){
r=s;
}else if(this.sc3.indexOf(s)>=0){
r=false;}
}else if(s==="simple"){
}else if(k>5){
k=s.indexOf("-");
if(k===2||k===3){
if(/^[a-z][a-z][a-z]?-[a-z][a-z][\-a-z]*/.test(got)){
r=false;}}}
}else{
r=s;}
return r;
};
FAdm.lang.isO_639_1=function(ask){
var s="|aa|ab|ae|af|ak|am|an|ar|as|av|ay|az|ba|be|bg|bh|bi|bm|bn|bo|br|bs|ca|ce|ch|co|cr|cs|cu|cv|cy|da|de|dv|dz|ee|el|en|eo|es|et|eu|fa|ff|fi|fj|fo|fr|fy|ga|gd|gl|gn|gu|gv|ha|he|hi|ho|hr|ht|hu|hy|hz|ia|id|ie|ig|ii|ik|io|is|it|iu|ja|jv|ka|kg|ki|kj|kk|kl|km|kn|ko|kr|ks|ku|kv|kw|ky|la|lb|lg|li|ln|lo|lt|lu|lv|mg|mh|mi|mk|ml|mn|mr|ms|mt|my|na|nb|nd|ne|ng|nl|nn|no|nr|nv|ny|oc|oj|om|or|os|pa|pi|pl|ps|pt|qu|rm|rn|ro|ru|rw|sa|sc|sd|se|sg|sh|si|sk|sl|sm|sn|so|sq|sr|ss|st|su|sv|sw|ta|te|tg|th|ti|tk|tl|tn|to|tr|ts|tt|tw|ty|ug|uk|ur|uz|ve|vi|vo|wa|wo|xh|yi|yo|za|zh|zu|";
return(s.indexOf(ask)>0);
};
};
mediaWiki.libs.fileAdm.bb.lang(mediaWiki.libs.fileAdm);
delete mediaWiki.libs.fileAdm.bb.lang;
mediaWiki.libs.fileAdm.bb.misc=function(FAdm,mw){
"use strict";
if(typeof FAdm.misc!=="object"){
FAdm.misc={lean:false};}
FAdm.misc.message=function(apply,assign,always,absolute){
var $e;
var s;
if(!this.lean){
mw.util.addCSS(".cn-fundraiser-banner,#mw-js-message,#siteNotice,#fundraising\n{display: none;}");
this.lean=true;}
if(apply){
if(absolute){
if(this.$msgTop){
this.$msgTop.empty();
}else{
$e=jQuery("#content");
if($e.length){
s="<div class='fileAdmTop'></div>";
this.$msgTop=jQuery(s);
$e.before(this.$msgTop);}}
if(this.$msgTop){
s="position:  relative;display:   block;"+
absolute;
this.$msgTop.attr("style",s);
this.$msgTop.append(apply);}
}else{
if(this.$msg){
this.$msg.empty();
}else{
$e=jQuery("#bodyContent");
if(!$e.length){
$e=jQuery("#article");
if(!$e.length){
$e=jQuery("#content");}}
if($e.length){
this.$msg=jQuery("<div class='fileAdm'></div>");
$e.before(this.$msg);}}
if(this.$msg){
s="display:   block;font-size: 90%;";
this.$msg.attr("style",s);
this.$msg.append(apply);}}
}else{
if(this.$msgTop){
this.$msgTop.attr("style","display: none;");}
if(this.$msg){
this.$msg.attr("style","display: none;");}}
};
};
mediaWiki.libs.fileAdm.bb.misc(mediaWiki.libs.fileAdm,mediaWiki);
delete mediaWiki.libs.fileAdm.bb.misc;
mediaWiki.libs.fileAdm.bb.ns=function(FAdm,mw){
"use strict";
if(typeof FAdm.ns!=="object"){
FAdm.ns={};}
FAdm.ns.fetch=function(access){
var r;
if(!FAdm.ns.map){
FAdm.ns.map=mw.config.get("wgFormattedNamespaces");}
r=FAdm.ns.map[FAdm.str.fromNum(access)];
return r;
};
};
mediaWiki.libs.fileAdm.bb.ns(mediaWiki.libs.fileAdm,mediaWiki);
delete mediaWiki.libs.fileAdm.bb.ns;
mediaWiki.libs.fileAdm.bb.opt=function(FAdm,mw){
"use strict";
if(typeof FAdm.opt!=="object"){
FAdm.opt={control:{},page:{}};}
if(typeof FAdm.opt.control!=="object"){
FAdm.opt.control={};}
if(typeof FAdm.opt.page!=="object"){
FAdm.opt.page={};}
FAdm.opt.factory=function(arglist){
var r=false;
arglist.click="void(0);";
arglist.id="ca-toggle-"+arglist.name;
FAdm.portlet.factory(arglist);
if(arglist.a){
arglist.varText=document.createElement("span");
if(arglist.varText){
r=true;
arglist.a.dom.appendChild(arglist.varText);
arglist.varText.textContent="* * *";}}
return r;
};
FAdm.opt.fetch=function(arglist,already){
var expiry={expires:null,path:"/"};
var r;
var re0=/^(false|0)$/;
var re1=/^(true|1)$/;
var spec="fileAdm_"+arglist.env;
var store;
if(already===undefined){
store=jQuery.cookie(spec);
if(typeof(store)==="string"){
if(arglist.typ==="number"){
if(store!=="NaN"){
r=store;}
}else{
r=store;}}
}else{
r=already;}
if(r===undefined&&arglist.obj!==undefined){
r=arglist.obj;}
if(r===undefined){
r=arglist.val;}
switch(typeof(r)){
case "string":
switch(arglist.typ){
case "boolean":
if(re0.test(store)){
r=false;
}else if(re1.test(store)){
r=true;}
break;
case "choice":
r=r.toLowerCase();
break;
case "number":
r=parseInt(r,10);
break;}
store=r;
break;
case "boolean":
store=(r?"true":"false");
break;
case "number":
store=FAdm.str.fromNum(r);
break;}
if(this.keep<0){
store=null;
}else if(this.keep>0){
expiry.expires=this.keep;}
jQuery.cookie(spec,store,expiry);
return r;
};
FAdm.opt.fire=function(){
if(this.fired("fA-radio_memory_0")){
this.keep=0;
}else if(this.fired("fA-radio_memory_28")){
this.keep=28;
}else{
this.keep=-1;}
if(this.fired("fA-radio_watchQ_preferences")){
FAdm.batch.watchQ="preferences";
}else if(this.fired("fA-radio_watchQ_nochange")){
FAdm.batch.watchQ="nochange";
}else if(this.fired("fA-radio_watchQ_unwatch")){
FAdm.batch.watchQ="unwatch";
}else{
FAdm.batch.watchQ="watch";}
if(this.fired("fA-radio_watchT_preferences")){
FAdm.batch.watchT="preferences";
}else if(this.fired("fA-radio_watchT_nochange")){
FAdm.batch.watchT="nochange";
}else if(this.fired("fA-radio_watchT_unwatch")){
FAdm.batch.watchT="unwatch";
}else{
FAdm.batch.watchT="watch";}
this.fetch(this.memory,this.keep);
FAdm.guide.lessMini=this.fired("fA-radio_lessMini_true");
FAdm.wins.lot=this.fired("fA-radio_multiWin_true");
this.fetch(this.multiWin,FAdm.wins.lot);
this.fetch(this.lessMini,FAdm.guide.lessMini);
this.fetch(this.watchQ,FAdm.batch.watchQ);
this.fetch(this.watchT,FAdm.batch.watchT);
this.fresh();
};
FAdm.opt.fired=function(access){
var r;
var $el=jQuery("#"+access);
if($el.length){
if($el.prop("checked")){
r=true;
}else{
r=false;}}
return r;
};
FAdm.opt.fit=function(){
if(typeof(FAdm.options)==="object"){
this.fitter(this.memory);
this.fitter(this.lessMini);
this.fitter(this.multiWin);
this.fitter(this.watchQ);
this.fitter(this.watchT);}
};
FAdm.opt.fitter=function(arglist){
var s,v=FAdm.options[arglist.env];
if(v!==undefined){
s=(arglist.typ==="choice"?"string":arglist.typ);
if(typeof(v)===s){
arglist.obj=v;}}
};
FAdm.opt.fresh=function(){
FAdm.wins.lot=FAdm.opt.fetch(FAdm.opt.multiWin);
FAdm.guide.lessMini=FAdm.opt.fetch(FAdm.opt.lessMini);
FAdm.batch.watchQ=FAdm.opt.fetch(FAdm.opt.watchQ);
FAdm.batch.watchT=FAdm.opt.fetch(FAdm.opt.watchT);
};
FAdm.opt.control.factory=function(access,aim,apply,assign,active){
var r="<input id='"+access+"' type='"+aim+"'";
var show;
switch(aim){
case "radio":
r=r+" name='"+assign+"'";
case "checkbox":
if(apply){
r=r+" checked='init'";}
break;
case "text":
if(apply){
if(apply.length){
show=apply.replace(/\x27/g,"%27");
r=r+" value='"+show+"'";}}
break;
case "submit":
r=r+" value='"+(apply.length?apply:"Submit")+"'";
break;}
if(typeof(active)==="boolean"){
if(!active){
r=r+" disabled'";}}
r=r+">";
return r;
};
FAdm.opt.control.formel=function(arglist){
var s=this.factory(arglist.id,"checkbox",arglist.checked,undefined,arglist.active);
var $r=jQuery(s);
if(arglist.hint){
$r.attr("title",arglist.hint);}
return $r;
};
FAdm.opt.page.form=function(){
var script;
var watches;
var $form=jQuery("#fA-form1");
jQuery("#fA_noscript").remove();
if($form.length){
script=FAdm.str.call+"opt.fire();void(0);";
watches=["preferences","watch","nochange","unwatch"];
$form.wrap("<form action='"+script+"' method='POST'>");
FAdm.opt.keep=FAdm.opt.fetch(FAdm.opt.memory);
FAdm.opt.fresh();
FAdm.users.fetch();
this.forming("memory",FAdm.opt.keep,[-1,0,28]);
this.forming("multiWin",FAdm.wins.lot);
this.forming("lessMini",FAdm.guide.lessMini);
this.forming("watchQ",FAdm.batch.watchQ,watches);
this.forming("watchT",FAdm.batch.watchT,watches);
this.formula("TUSC1cn",FAdm.users.n,40,100);
this.formula("TUSC1pw",false,40,40);
this.format("fA-form1-submit","submit");
this.$table=mw.util.$content.find("#fA-form1");
this.found("memory");
this.found("multiWin");
this.found("lessMini");
this.found("watchQ");
this.found("watchT");}
};
FAdm.opt.page.format=function(access,aim,apply,assign){
var r=false;
var show;
var $el=jQuery("#"+access);
if($el.length){
show=apply;
if(aim==="submit"){
show=$el.text();}
r=$el.replaceWith(FAdm.opt.control.factory(access,aim,show,assign));}
return r;
};
FAdm.opt.page.forming=function(access,apply,allow){
var i;
var k;
var n;
var start="fA-radio_"+access;
var $el;
var $false;
var $true;
if(typeof(apply)==="boolean"){
$false=this.format(start+"_false","radio",!apply,start);
$true=this.format(start+"_true","radio",apply,start);
}else if(typeof(allow)==="object"){
n=allow.length;
for(i=0;i<n;i++){
k=allow[i];
$el=this.format(start+"_"+k,"radio",(k===apply),start);}}
};
FAdm.opt.page.formula=function(access,apply,aware,amount){
var light=(typeof(apply)==="string");
var see=(light?"text":"password");
var $el=this.format("fA-"+see+"_"+access,see,apply);
if($el.length){
$el.attr("size",aware);
$el.attr("maxlength",amount);}
};
FAdm.opt.page.found=function(access){
var v=FAdm.opt[access];
var s;
var $el;
if(v){
v=v.obj;
switch(typeof(v)){
case "string":
s="&quot;"+v+"&quot;";
break;
case "boolean":
s=(v?"true":"false");
break;
case "number":
s=FAdm.str.fromNum(v);
break;
default:
s=false;}
if(s){
$el=this.$table.find("#fA-option_"+access);
$el.text(s);}}
};
};
mediaWiki.libs.fileAdm.bb.opt(mediaWiki.libs.fileAdm,mediaWiki);
delete mediaWiki.libs.fileAdm.bb.opt;
mediaWiki.libs.fileAdm.bb.portlet=function(FAdm,mw){
"use strict";
if(typeof FAdm.portlet!=="object"){
FAdm.portlet={};}
FAdm.portlet.factory=function(arglist){
var domEl;
var domNodes=this.fetch();
var href="#-";
var link=(typeof(arglist.href)==="string");
var r=false;
var re;
if(link){
href=arglist.href;
}else if(typeof(arglist.click)==="string"){
href=FAdm.str.call+arglist.click;
link=true;}
if(link){
if(href.indexOf(FAdm.str.script)===0){
re=new RegExp("\\bvoid *\\(");
if(!re.test(href)){
href=href+";void(0);";}}}
arglist.portlet=mw.util.addPortletLink(domNodes[0],href,arglist.title,arglist.id,arglist.hint,arglist.hotkey,domNodes[1]);
if(arglist.portlet){
domEl=arglist.portlet;
arglist.a=false;
while(domEl){
if(domEl.nodeName.toUpperCase()==="A"){
arglist.a={dom:domEl,id:arglist.id+".a"};
break;
}else if(domEl.hasChildNodes()){
domEl=domEl.firstChild;
}else{
break;}}
if(arglist.a){
arglist.a.dom.setAttribute("id",arglist.a.id);
if(!link){
jQuery("#"+arglist.a.id).click(function(event){
event.preventDefault();
arglist.click();
});}
if(typeof(arglist.target)==="string"){
arglist.a.dom.target=arglist.target;}
r=arglist.a;
}else{
arglist.portlet=false;}}
return r;
};
FAdm.portlet.fetch=function(){
var scope="p-tb";
var sel;
var stick="#t-whatlinkshere";
var $li;
if(mw.config.get("skin")==="vector"){
if(typeof(this.$portlet)!=="object"){
sel="#right-navigation";
this.$portlet=jQuery(document).find(sel);}
if(this.$portlet.length){
sel="#p-cactions .menu li";
$li=this.$portlet.find(sel);
if($li.length){
stick=$li.get(0);
}else{
stick="#-";}
scope="p-cactions";}}
return[scope,stick];
};
FAdm.portlet.flip=function(arglist,apply){
var script;
if(arglist){
if(arglist.varText){
script=arglist.script+"("+!apply+");";
arglist.a.dom.href=FAdm.str.call+script+"void(0);";
arglist.varText.textContent=" "+(apply?arglist.off:arglist.on);
arglist.last=apply;}}
};
};
mediaWiki.libs.fileAdm.bb.portlet(mediaWiki.libs.fileAdm,mediaWiki);
delete mediaWiki.libs.fileAdm.bb.portlet;
mediaWiki.libs.fileAdm.bb.queer=function(FAdm,mw){
"use strict";
if(typeof FAdm.queer!=="object"){
FAdm.queer={};}
FAdm.queer.features=function(advanced,assign){
var i;
var max;
var option;
var portlink;
var s;
var $form;
var $ta;
if(assign&&false){
FAdm.users.flag("Q",advanced);}
if(advanced||true){
FAdm.queer.id="fileAdm_Questionable";
FAdm.queer.style="border: solid 2px #FF0000; width: auto; background-color: #FFD9E2; padding: 5px; margin-top: 10px;";
FAdm.queer.splash="file.first('questionable')";
FAdm.queer.start="queer.fire()";
FAdm.queer.submit="queer.flash()";
FAdm.file.forge(FAdm.queer);
if(FAdm.queer.$box){
max=-1;
if(FAdm.queer.opts){
max=FAdm.queer.opts.length;}
$form=jQuery("<form />");
for(i=0;i<max;i++){
option=FAdm.queer.opts[i];
option.id="fA-checkbox_"+i;
if(typeof(option.active)!=="boolean"){
option.active=true;}
if(typeof(option.checked)!=="boolean"){
option.checked=false;}
$form.append("<br>");
$form.append(FAdm.opt.control.formel(option));
$form.append(option.key);}
if(!FAdm.str.action){
FAdm.str.action=mw.config.get("wgAction");}
if(FAdm.str.action==="view"){
s="<textarea id='fA-textarea'>";
$ta=jQuery(s);
$ta.attr("rows","'"+FAdm.queer.textarea[0]+"'");
$ta.attr("style","width: 95%;");
$form.append($ta);}
FAdm.queer.$content.append($form);
FAdm.misc.message(FAdm.queer.$box,"fileAdmQuestionable",true);
if(FAdm.queer.link.portlet){
portlink=FAdm.queer.link.portlet;
portlink.parentNode.removeChild(portlink);
FAdm.queer.link.portlet=false;}}}
};
FAdm.queer.feed=function(apply){
var i;
var max=-1;
var r=false;
var re;
if(this.opts){
max=this.opts.length;
r=new Array(max);}
for(i=0;i<max;i++){
re=new RegExp("\\| *"+this.opts[i].key+" *","i");
r[i]=re.test(apply);}
return r;
};
FAdm.queer.fetch=function(about,apply){
var i;
var liked;
var max=-1;
var num;
var pars;
var s;
var $elem;
if(this.opts){
max=this.opts.length;}
for(i=0;i<max;i++){
if(typeof(this.opts[i].checked)!=="boolean"){
this.opts[i].checked=false;}}
switch(about){
case 0:
for(i=0;i<max;i++){
$elem=jQuery("#"+this.opts[i].id);
liked=$elem.prop("checked");
this.opts[i].checked=liked;}
break;
case 1:
for(i=0;i<max;i++){
$elem=jQuery("#fileAdm_Qn_"+i);
if($elem.length){
this.opts[i].active=false;
this.opts[i].checked=true;
}else{
$elem=jQuery("#fileAdm_Q_"+i);
if($elem.length){
this.opts[i].checked=true;}}}
break;
case 2:
pars=false;
if(typeof(apply)==="string"){
pars=apply.split("/");}
if(pars){
for(i=0;i<pars.length;i++){
s=pars[i];
if(typeof(s)==="string"){
s=FAdm.str.trimRight(s);
if(s.length){
num=parseInt(s,10);
if(num>=0&&num<max){
this.opts[num].checked=true;}}}}}
break;
case 3:
pars=this.feed(apply);
for(i=0;i<max;i++){
this.opts[i].checked=pars[i];}
break;
case 4:
pars=this.feed(apply);
for(i=0;i<max;i++){
if(pars[i]){
this.opts[i].active=false;
this.opts[i].checked=true;}}
break;}
};
FAdm.queer.fire=function(){
var i;
var got;
var max;
var option;
var say;
var story;
FAdm.queer.fetch(0,false);
if(FAdm.ia){
got=FAdm.queer.format(FAdm.edit.field(false));
if(got){
FAdm.edit.field(got[0]);}
}else{
max=-1;
say=FAdm.queer.free();
story="questionable/";
if(FAdm.queer.opts){
max=FAdm.queer.opts.length;}
for(i=0;i<max;i++){
option=FAdm.queer.opts[i];
if(option.checked){
if(option.active){
story=story+i+"/";}}}
if(say){
say=encodeURIComponent(say).replace(/\//g,"%2F")
.replace(/\'/g, "%27" );
story=story+"/*"+say+"*/";}
FAdm.file.fire(story);}
};
FAdm.queer.flash=function(){
this.fetch(0,false);
this.stuck=this.free();
FAdm.batch.watch=FAdm.batch.watchQ;
FAdm.batch.flash(this.format,true);
};
FAdm.queer.force=function(adjust){
var r;
r=FAdm.queer.format(adjust,true);
if(FAdm.users.fidelity()){
FAdm.trans.bot.feeder();}
return r;
};
FAdm.queer.format=function(adjust,assign){
var basic=FAdm.file.format(adjust);
var i;
var jot;
var light;
var max=-1;
var old=false;
var option;
var r=false;
var say=false;
var select;
var story="{{"+FAdm.queer.stamp;
var suffix=adjust;
var summary;
var text;
var wl;
if(basic){
suffix=basic[0];}
text=FAdm.edit.find(FAdm.queer.stamp,suffix);
if(text){
old=FAdm.queer.feed(text[0]);
suffix=text[1];}
if(typeof(assign)==="string"){
select=assign;
jot=select.indexOf("/*");
if(jot>=0){
say=select.substr(jot+2);
say=say.substr(0,say. length-2);
select=select.substr(0,jot);}
FAdm.queer.fetch(2,select);
}else{
say=FAdm.queer.stuck;
FAdm.queer.fetch(1,false);}
if(FAdm.queer.opts){
max=FAdm.queer.opts.length;}
for(i=0;i<max;i++){
option=FAdm.queer.opts[i];
if(option.checked){
if(typeof(option.active)!=="boolean"){
option.active=true;}
if(option.active){
story=story+"|"+option.key;}}}
if(say){
say=FAdm.str.trimRight(FAdm.str.trimLeft(say));
story=story+"|"+FAdm.queer.specific+"="+FAdm.str.escapePipes(say);}
story=story+"}}";
if(suffix){
story=story+"\n\n"+suffix;}
if(FAdm.str.trimRight(story)!==FAdm.str.trimRight(adjust)){
light=true;
summary=FAdm.queer.summary;
wl=false;
if(old){
summary=FAdm.edit.summary0;
for(i=0;i<max;i++){
if(FAdm.queer.opts[i].checked!==old[i]){
light=false;
summary=FAdm.queer.summary;
wl=FAdm.batch.watchQ;
break;}}}
r=[story,summary,light,FAdm.queer.subject,wl];}
return r;
};
FAdm.queer.free=function(){
var r=false;
var s;
var $free=jQuery("#fA-textarea");
if($free.length){
s=$free.val();
if(s.length){
r=FAdm.str.trimRight(FAdm.str.trimLeft(s));}}
return r;
};
};
mediaWiki.libs.fileAdm.bb.queer(mediaWiki.libs.fileAdm,mediaWiki);
delete mediaWiki.libs.fileAdm.bb.queer;
mediaWiki.libs.fileAdm.bb.review=function(FAdm,mw){
"use strict";
if(typeof FAdm.review!=="object"){
FAdm.review={};}
FAdm.review.features=function(advanced,assign){
var got=false;
var lapsus;
var mode;
var show;
var stuff;
var $info,$ol;
if(assign){
FAdm.users.flag("R",advanced);}
if(advanced){
show=FAdm.review.selTemplate+"{ display: none !important; }";
mw.util.addCSS(show);
got=FAdm.review.fine();}
if(got){
mode=got[0];
lapsus=(mode<-1);
FAdm.review.id="fileAdm_Review";
FAdm.review.style="border: solid 2px; width: auto; "+(lapsus?"color: #FF0000; ":"background-color: #B4EEB4; ")+"padding: 5px; margin-top: 10px;";
if(mode===0||mode===1){
FAdm.review.splash="file.first('approve')";
FAdm.review.start="file.fire('approve')";
FAdm.review.submit="review.flash()";
}else{
FAdm.review.splash=false;
FAdm.review.start=false;
FAdm.review.submit=false;}
FAdm.file.forge(FAdm.review);
if(FAdm.review.$box){
$info=jQuery("<p />");
if(mode>0){
$ol=jQuery("<ol />");
$ol.append(got[1]);
if(got[2]){
$ol.append(got[2]);}
FAdm.review.$content.append($ol);}
switch(mode){
case 0:
stuff=FAdm.review.setup;
break;
case 1:
stuff=FAdm.review.signed;
break;
case-1:
stuff=FAdm.review.self;
break;
case 2:
stuff=FAdm.review.second;
break;
case-2:
stuff=FAdm.review.sucks;
break;
case-3:
stuff=FAdm.review.scope;
break;}
$info.text(stuff);
FAdm.review.$content.append($info);
if(!FAdm.cat.file(false)){
$info=jQuery("<p />");
$info.text(FAdm.review.scatter+".");
$info.attr("style","color: #FF0000;");
FAdm.review.$content.append($info);}
FAdm.misc.message(FAdm.review.$box,"fileAdmReview",false,false);}}
};
FAdm.review.fine=function(){
var gcs;
var i;
var lapsus;
var n;
var r;
var re;
var s;
var scope1;
var scope2;
var signed;
var story;
var $user;
var $user1;
var $user2;
var $users;
r=(!FAdm.file.foreign());
if(r){
gcs=FAdm.guide.cats;
lapsus=true;
n=0;
$user1=false;
$user2=false;
FAdm.guide.furnish();
if(!FAdm.file.cats){
FAdm.file.cats=mw.config.get("wgCategories");}
if(jQuery.isArray(FAdm.file.cats)){
n=FAdm.file.cats.length;}
r=0;
for(i=0;i<n;i++){
s=FAdm.file.cats[i];
story=FAdm.ns.sCat+":"+s;
if(FAdm.guide.fulfil(story,gcs.review0)){
lapsus=false;
}else if(FAdm.guide.fulfil(story,gcs.checking)){
r=-2;
break;
}else if(!r){
if(FAdm.guide.fulfil(story,gcs.review1)){
r=1;
}else if(FAdm.guide.fulfil(story,gcs.review2)){
r=2;}}}
if(!n&&FAdm.ia){
story="/wiki/"+mw.util.wikiUrlencode(gcs.review0[0]);
scope1="/wiki/"+mw.util.wikiUrlencode(gcs.review1[0]);
scope2="/wiki/"+mw.util.wikiUrlencode(gcs.review2[0]);
n=document.links.length;
for(i=0;
i<n&&(!r||lapsus);
i++){
s=document.links[i].pathname;
if(s.indexOf(story)===0){
lapsus=false;
}else if(s.indexOf(scope1)===0){
r=1;
}else if(s.indexOf(scope2)===0){
r=2;}}}
if(lapsus){
r=-3;}
if(r>0){
$users=jQuery("#fileAdm_Review-users");
if($users.length){
$user=$users.find("#fileAdm_Review-user1");
$user1=$user.clone();
$user1=$user.clone();
$user1.removeAttr("id");
$user=$users.find("#fileAdm_Review-user2");
$user2=$user.clone();
$user2.removeAttr("id");
$users.empty();
if(!$user2.length){
if($user1.length){
$user=$user1.find("a");}
if($user.length){
FAdm.users.fetch();
signed=$user.attr("href");
if(signed){
FAdm.ns.fetch(true);
s="/wiki/"+FAdm.ns.sUsers+":"+FAdm.users.w+" ";
re=new RegExp(s,"i");
if(re.test(signed+" ")){
r=-1;}}
}else{
r=false;}}}}
r=[r,$user1,$user2];}
return r;
};
FAdm.review.flash=function(){
FAdm.batch.flash(FAdm.review.force,true);
};
FAdm.review.force=function(adjust){
return FAdm.review.format(adjust,true);
};
FAdm.review.format=function(adjust,approve){
var got;
var sign;
var signed;
var start;
var story;
var suffix;
var swap;
var label=approve;
var mode=0;
var r;
var re;
var seek;
var shift;
var summary;
r=FAdm.file.format(adjust);
shift=(r?r[0]:adjust);
if(label){
re=FAdm.edit.template.fetchRE(FAdm.file.stNowCommons,true);
re=new RegExp(re);
if(re.test(shift)){
label=false;
}else{
FAdm.users.fetch();}}
if(label){
got=FAdm.edit.formatPageTail(shift);
start=got[0];
story=false;
suffix=got[1];
swap="";
got=FAdm.edit.fold(start,FAdm.review.stamp,true,false);
if(got[1]){
sign="[["+FAdm.ns.sUser+":"+FAdm.users.n;
signed="|"+sign+"|"+FAdm.users.n+"]] ~~~~~}}";
story=got[2];
start=got[3];
if(story){
story=FAdm.users.fair(story);
if(story.indexOf("~~~~")>0){
if(story.indexOf(sign)>0){
mode=-1;}}
if(!mode){
seek=".*\\[\\[[A-Za-z]+:[^[}]+\\]\\].*";
re=new RegExp(seek+"\\|"+seek);
if(re.test(story)){
mode=-2;
}else{
re=new RegExp(seek);
if(re.test(story)){
mode=2;}}}
}else{
mode=1;}
}else{
mode=1;}
if(mode){
if(mode>0){
swap="{{"+FAdm.review.stamp;
if(mode===2){
swap=swap+story;}
swap=swap+signed;}
if(start.length&&swap.length){
start=start+"\n\n";}
start=start+swap+"\n";
if(suffix.length){
start=start+"\n"+suffix+"\n";}
shift=start+"\n";}}
if(shift!==adjust){
summary=false;
switch(mode){
case 1:
summary=FAdm.review.summary1;
break;
case 2:
summary=FAdm.review.summary2;
break;
default:
if(FAdm.str.trimRight(shift)!==FAdm.str.trimRight(adjust)){
summary=FAdm.edit.summary0;}}
r=[shift,summary,(mode>0),FAdm.review.subject];}
return r;
};
};
mediaWiki.libs.fileAdm.bb.review(mediaWiki.libs.fileAdm,mediaWiki);
delete mediaWiki.libs.fileAdm.bb.review;
mediaWiki.libs.fileAdm.bb.str=function(FAdm,mw){
"use strict";
if(typeof FAdm.str!=="object"){
FAdm.str={page:{scp:false}};}
if(typeof FAdm.str.page!=="object"){
FAdm.str.page={scp:false};}
FAdm.str.dateISO=function(age){
var r;
var k=age.getFullYear()*10000+(age.getMonth()+1)*100+age.getDate();
var s=this.fromNum(k);
r=s.substr(0,4)+"-"+s.substr(4,2)+"-"+
s.substr(6,2);
return r;
};
FAdm.str.escapePipes=function(adjust){
var r=adjust,s;
if(r.indexOf("|")>=0){
if(!this.reWSpaces){
this.reWSpaces=new RegExp("[\t\f ]+","g");}
if(!this.rePipeTemplate){
s="(\\{\\{[^}]+)\\|([^}]+\\}\\})";
this.rePipeTemplate=new RegExp(s);
this.rePipesTemplate=new RegExp(s,"g");}
r=r.replace(this.reWSpaces," ").replace(/\]/g,"\f")
.replace(/(\[\[[^|\f]+)\|([^\f]+\f\f)/g,"$1\t$2");
do{
s=r;
r=r.replace(this.rePipesTemplate,"$1\t$2");
}while(s!==r);
r=r.replace(/\|/g,"&#124;")
.replace(/\f/g,"]")
.replace(/\t/g,"|");}
return r;
};
FAdm.str.fromNum=function(adjust){
return adjust.toString();
};
FAdm.str.removeString=function(adjust,apply){
var i;
var n=apply.length;
var r=false;
var s=adjust;
while(n){
i=s.indexOf(apply);
if(i<0){
break;
}else{
r=s.substr(0,i)+s.substr(i+n);
s=r;}}
return r;
};
FAdm.str.substrEnd=function(apply,amount){
return apply.substr(apply.length-amount);
};
FAdm.str.trimLeft=function(adjust){
var r=adjust;
if(r.length){
while(r.charCodeAt(0)<=32){
r=r.substr(1);
if(!r.length){
break;}}}
return r;
};
FAdm.str.trimRight=function(adjust){
var n=adjust.length;
var r=adjust;
if(n>0){
n--;
while(r.charCodeAt(n)<=32){
r=r.substr(0,n);
n--;
if(n<0){
break;}}}
return r;
};
FAdm.str.urlencode=function(adjust){
var i;
var obj;
var r;
var start;
var suffix;
r=mw.util.wikiUrlencode(this.trimLeft(adjust));
i=r.indexOf(":");
if(i>0){
start=r.substr(0,i);
suffix=r.substr(i+1).replace(/:/g,"%3A");
obj=mw.config.get("wgNamespaceIds");
if(typeof(obj[start.toLowerCase()]==="number")){
r=start+":"+suffix;
}else{
r=start+"%3A"+suffix;}}
return r;
};
};
mediaWiki.libs.fileAdm.bb.str(mediaWiki.libs.fileAdm,mediaWiki);
delete mediaWiki.libs.fileAdm.bb.str;
mediaWiki.libs.fileAdm.bb.trans=function(FAdm,mw){
"use strict";
if(typeof FAdm.trans!=="object"){
FAdm.trans={bot:{},idle:{},vsn:{}};}
if(typeof FAdm.trans.bot!=="object"){
FAdm.trans.bot={};}
if(typeof FAdm.trans.idle!=="object"){
FAdm.trans.idle={};}
if(typeof FAdm.trans.vsn!=="object"){
FAdm.trans.vsn={};}
FAdm.trans.features=function(advanced,assign){
var layer;
var lazy=(FAdm.file.type==="transfix"||FAdm.file.type==="transnot"||
FAdm.file.type==="trash");
var say;
var $button;
var $err;
var $flash;
var $idle;
if(assign){
FAdm.users.flag("T",advanced);}
if(advanced){
layer=(FAdm.str.action==="view");
FAdm.trans.id="fileAdm_Transfer";
FAdm.trans.style="border: solid 2px #0000FF; width: auto; background-color: #DDDDFF; padding: 5px; margin-top: 10px;";
if(!lazy){
FAdm.trans.splash="file.first('transfer')";
FAdm.trans.start="file.fire('transfer')";
FAdm.trans.submit="trans.flash()";}
FAdm.file.forge(FAdm.trans);
if(lazy){
say=false;
if(FAdm.file.type==="transnot"){
say=FAdm.trans.sucks;
}else if(FAdm.file.type==="trash"){
say="NowCommons";}
if(say){
$err=jQuery("<strong />");
if($err.length){
$err.attr("style","color: #FF0000; font-weight: bold");
$err.text(say);
FAdm.trans.$content.append($err);}
}else if(layer&&FAdm.file.type==="transfix"){
$button=jQuery("<p />");
$flash=jQuery("<a />");
$idle=jQuery("<span />");
$flash.text(FAdm.trans.idle.say);
$flash.attr("href",FAdm.str.call+"trans.idle.flash()");
$flash.attr("style",FAdm.batch.styleButton);
$button.append($flash);
$idle.attr("id",FAdm.trans.idle.id);
$idle.text(" "+FAdm.trans.idle.sleep);
$idle.css("display","none");
$button.append($idle);
FAdm.trans.$content.append($button);
FAdm.trans.idle.fetch();}
if(FAdm.file.type==="trash"){
FAdm.trans.vsn.find();}}
FAdm.misc.message(FAdm.trans.$box,"fileAdmTransfer",true);
FAdm.trans.bot.post=false;
FAdm.batch.fetch(FAdm.trans.bot.pageName,FAdm.trans.bot.found);}
};
FAdm.trans.flash=function(){
FAdm.batch.watch=FAdm.batch.watchT;
FAdm.batch.flash(this.force,true);
};
FAdm.trans.flop=function(already){
var gcs;
var i;
var r=false;
var s;
var style;
var $box;
var $head;
var $info;
if(already){
r=true;
}else{
gcs=FAdm.guide.cats;
if(!gcs){
FAdm.file.cats=mw.config.get("wgCategories");
gcs=FAdm.guide.cats;}
for(i=0;i<gcs.length;i++){
s=gcs[i].title;
if(FAdm.guide.fulfil(s,gcs.transfer)){
r=true;
}else if(FAdm.guide.fulfil(s,gcs.transit)){
r=true;
}else if(FAdm.guide.fulfil(s,gcs.transmit)){
r=true;
}else if(FAdm.guide.fulfil(s,gcs.transfix)){
r=true;}
if(r){
break;}}}
if(r){
style="color: #FF0000; border: solid 2px; width: auto; padding: 5px; margin-top: 10px;";
$box=jQuery("<div />");
$head=jQuery("<strong />");
$info=jQuery("<span />");
$head.text(FAdm.str.sayConflict);
$box.append($head);
$info.text(" * "+this.sayNo);
$box.append($info);
FAdm.misc.message($box,"fileAdmTransferNoCommons",true);}
return r;
};
FAdm.trans.force=function(adjust){
var r;
FAdm.str.page.content=adjust;
r=FAdm.trans.format(true);
if(r){
FAdm.str.page.content=r[0];}
FAdm.trans.bot.feeder();
return r;
};
FAdm.trans.format=function(approve){
var r;
var got;
var label=true;
var mode=0;
var re=FAdm.edit.template.fetchRE(FAdm.file.stNoCommons,true);
var shift=FAdm.str.page.content;
var splash;
var summary;
var wl;
r=FAdm.file.format(FAdm.str.page.content);
if(r){
shift=r[0];
mode=1;}
re=new RegExp(re);
if(re.test(shift)){
this.flop(true);
label=false;
}else{
re=FAdm.edit.template.fetchRE(FAdm.file.stNowCommons,true);
re=new RegExp(re);
if(re.test(shift)){
label=false;}}
this.bot.commons=false;
if(label&&approve){
got=FAdm.edit.fold(shift,this.stable,false,false);
if(got){
shift=got[3];
this.bot.commons=true;}
got=FAdm.edit.find(this.suitable,shift);
if(got){
splash=FAdm.edit.template.fetchParameter(got[0],2);
shift=got[1];
if(splash){
this.bot.commons=splash;
}else{
this.bot.commons=true;}}}
if(label){
got=FAdm.edit.fold(shift,this.stamp,false,true);
if(got){
splash=FAdm.edit.template.fetchParameter(got[0],1);
shift=got[3];
if(splash){
this.bot.commons=splash;
}else{
this.bot.commons=true;}
}else if(approve){
this.bot.commons=true;}
if(this.bot.commons){
if(typeof(this.bot.commons)==="string"){
splash="|1="+this.bot.commons;
}else{
splash="";
if(!FAdm.str.page.title){
FAdm.str.page.title=mw.config.get("wgTitle");}
this.bot.commons=FAdm.str.page.title;}
shift="{{"+this.stamp+splash+"}}\n\n"+shift;}}
if(shift!==FAdm.str.page.content){
summary="";
wl=false;
if(this.bot.commons){
summary=this.summary;
wl=FAdm.batch.watchT;
mode=2;
}else if(FAdm.str.trimRight(shift)!==FAdm.str.trimRight(FAdm.str.page.content)){
summary=FAdm.edit.summary0;}
FAdm.str.page.content=shift;
r=[FAdm.str.page.content,summary,(mode>0),this.subject,wl];}
return r;
};
FAdm.trans.bot.feed=function(){
var got;
var i;
var k;
var m;
var mode=false;
var n;
var re;
var seek;
var shift;
var split;
var start;
var stop;
this.post=false;
if(this.finish){
this.finish(true);}
if(!FAdm.str.page.title){
FAdm.str.page.title=mw.config.get("wgTitle");}
if(this.commons){
mode=1;
if(typeof(this.commons)!=="string"){
this.commons=FAdm.str.page.title;}}
if(FAdm.str.page.content){
re=FAdm.edit.template.fetchRE(FAdm.queer.quest,true);
re=new RegExp(re);
if(re.test(FAdm.str.page.content)){
mode=-1;}
if(!this.commons&&!mode){
re=FAdm.edit.template.fetchRE(FAdm.trans.stamp,false)+"[^}]*}}";
re=new RegExp(re);
got=re.exec(FAdm.str.page.content);
if(got!==null){
this.commons=FAdm.edit.template.fetchParameter(got[0],1);
mode=2;}
if(!this.commons){
this.commons=FAdm.str.page.title;}}}
if(typeof(this.queue)==="string"){
seek=mw.html.escape(FAdm.str.page.title);
start="<request local=\"";
split="\" commons=\"";
stop="\" />";
shift=false;
i=this.queue.indexOf(seek);
if(i>16){
k=-2;
n=seek.length;
m=i+n+11;
if(this.queue.slice(i-16,i)===start&&this.queue.slice(i+n,m)===split){
k=this.queue.indexOf(stop,m);
if(k>m){
shift=this.queue.slice(m,k);
if(this.commons){
if(this.commons!==shift){
mode=0;}}}}}
if(typeof(mode)==="number"){
FAdm.batch.faith();
start=start+seek+split;
if(mode<=0){
if(shift){
this.discard=start+shift+stop;}}
if(mode>=0){
this.update=start+mw.html.escape(this.commons)+stop;}
FAdm.batch.fetch(this.pageName,this.furnish);}}
};
FAdm.trans.bot.feeder=function(){
if(typeof(FAdm.trans.bot.queue)==="string"&&typeof(FAdm.str.page.content)==="string"){
FAdm.trans.bot.feed();
}else{
if(!FAdm.trans.bot.queue){
FAdm.trans.bot.queue=true;
FAdm.trans.bot.post=FAdm.trans.bot.feeder;
FAdm.batch.fetch(FAdm.trans.bot.pageName,FAdm.trans.bot.found);}
if(!FAdm.str.page.content){
FAdm.str.page.content=true;
FAdm.batch.feed(FAdm.trans.bot.feeder);}}
};
FAdm.trans.bot.find=function(advanced,assign){
if(advanced){
FAdm.trans.bot.finish(false);}
if(assign){
FAdm.users.flag("T",advanced);}
};
FAdm.trans.bot.finish=function(able){
var button;
var $button;
if(able){
button=document.getElementById("wpSave");
if(button!==null){
button.click();}
}else{
if(!FAdm.ia){
FAdm.edit.form();}
if(FAdm.ia){
$button=FAdm.ia.$editform.find("#wpSave");
if($button.length){
FAdm.trans.bot.$xSave=jQuery("<a />");
FAdm.trans.bot.$xSave.attr("href",FAdm.str.call+"trans.bot.finished()");
FAdm.trans.bot.$xSave.attr("style","border: solid 2px;border-color: #D0D0FF #D0D0FF #6060FF #6060FF;padding: 1px 2px;");
FAdm.trans.bot.$xSave.text(FAdm.trans.bot.save);
FAdm.trans.bot.$xSave.insertAfter($button);
$button.css("display","none");}}}
};
FAdm.trans.bot.finished=function(){
var change;
this.$xSave.attr("href",null);
this.$xSave.attr("style","border: solid 1px #0000FF; padding: 1px 2px;background-color: #D0D0FF");
FAdm.edit.field(false);
if(typeof(FAdm.str.page.content)==="string"){
change=FAdm.trans.format(false);
FAdm.edit.finalize(change);}
this.feeder();
};
FAdm.trans.bot.found=function(arrived){
var query=(typeof(arrived)==="object");
var sid;
if(query){
query=arrived.query;
if(query){
sid=query.pageids[0];
if(sid.charCodeAt(0)!==45){
query=query.pages[sid];
if(query){
query=query.revisions;
if(query){
query=query["0"];
if(query){
FAdm.trans.bot.queue=query["*"];
FAdm.trans.bot.rvtime=query.timestamp;}}}}
if(FAdm.trans.bot.post){
FAdm.trans.bot.post();}}}
};
FAdm.trans.bot.furnish=function(arrived){
var change;
var say=false;
var s;
FAdm.trans.bot.found(arrived);
FAdm.trans.bot.post=false;
if(FAdm.trans.bot.discard){
s=FAdm.str.removeString(FAdm.trans.bot.queue,FAdm.trans.bot.discard);
if(s){
FAdm.trans.bot.queue=s;
say="-";}}
if(FAdm.trans.bot.update){
s=FAdm.str.trimRight(FAdm.trans.bot.queue);
if(s.indexOf(FAdm.trans.bot.update)<0){
FAdm.trans.bot.queue=s+"\n\n"+FAdm.trans.bot.update+"\n";
if(say){
say="~";
}else{
say="+";}}}
if(say){
if(!FAdm.str.page.name){
FAdm.str.page.name=mw.config.get("wgPageName");}
if(!FAdm.str.page.title){
FAdm.str.page.title=mw.config.get("wgTitle");}
change=[FAdm.trans.bot.queue,say+" [["+FAdm.str.page.name+"|"+FAdm.str.page.title+"]]",false];
FAdm.batch.page=FAdm.trans.bot.pageName;
FAdm.batch.rvtime=FAdm.trans.bot.rvtime;
FAdm.batch.watch=FAdm.batch.watchT;
FAdm.batch.force(change,false);}
FAdm.misc.message();
};
FAdm.trans.idle.fetch=function(){
var timer=new Date();
timer.setTime(timer.getTime()-3*86400*1000);
if(!FAdm.str.page.name){
FAdm.str.page.name=mw.config.get("wgPageName");}
if(!FAdm.batch.api){
FAdm.batch.api=mw.util.wikiScript("api");}
this.query={action:"query",prop:"revisions",rvprop:"content|timestamp",rvlimit:1,indexpageids:true,titles:FAdm.str.page.name,format:"json"};
this.query.rvend=FAdm.str.dateISO(timer)+"T00:00:00Z";
jQuery.getJSON(FAdm.batch.api,this.query,this.found);
};
FAdm.trans.idle.flash=function(){
FAdm.trans.bot.finish=false;
FAdm.trans.bot.feeder();
};
FAdm.trans.idle.found=function(arrived){
var query=(typeof(arrived)==="object");
var lazy=false;
var $idle;
if(query){
query=arrived.query;
if(query){
query=query.pages[query.pageids[0]];
if(query){
query=query.revisions;
if(query){
lazy=(query.length===0);}}}}
if(lazy){
$idle=jQuery("#"+FAdm.trans.idle.id);
if($idle.length){
$idle.attr("style","color:#FF0000; font-style:italic;");}}
};
FAdm.trans.vsn.find=function(){
if(!FAdm.str.page.name){
FAdm.str.page.name=mw.config.get("wgPageName");}
if(!FAdm.batch.api){
FAdm.batch.api=mw.util.wikiScript("api");}
this.query={action:"query",prop:"imageinfo",iilimit:2,indexpageids:true,titles:FAdm.str.page.name,format:"json"};
jQuery.getJSON(FAdm.batch.api,this.query,this.found);
};
FAdm.trans.vsn.found=function(arrived){
var query=(typeof(arrived)==="object");
var $multi;
if(query){
query=arrived.query;
if(query){
query=query.pages[query.pageids[0]];
if(query){
query=query.imageinfo;
if(query){
if(query.length===2){
$multi=jQuery("<span />");
FAdm.file.lone=false;
$multi.text("... "+FAdm.trans.vsn.say);
FAdm.trans.$content.append($multi);
$multi=jQuery(FAdm.trans.vsn.sel);
if($multi.length){
$multi.attr("style",null);}}}}}}
};
};
mediaWiki.libs.fileAdm.bb.trans(mediaWiki.libs.fileAdm,mediaWiki);
delete mediaWiki.libs.fileAdm.bb.trans;
mediaWiki.libs.fileAdm.bb.users=function(FAdm,mw){
"use strict";
if(typeof FAdm.users!=="object"){
FAdm.users={};}
FAdm.users.fair=function(adjust){
if(!FAdm.ns.reUsers){
FAdm.ns.fetch(true);
FAdm.ns.reUsers=new RegExp("\\[\\[ *"+FAdm.ns.sUsers+": *","gi");}
return adjust.replace(FAdm.ns.reUsers,"[["+FAdm.ns.sUsers+":");
};
FAdm.users.familiar=function(ask,already,apply){
var select="fileAdm"+ask;
var stored;
var story=apply;
if(already&&apply){
stored=jQuery.cookie(select);
if(typeof(stored)!=="string"){
stored="";}
if(stored.indexOf(this.i)<0){
story=stored+apply;}}
if(story!==apply){
jQuery.cookie(select,story,{expires:null,path:"/"});}
};
FAdm.users.fetch=function(advanced){
var s;
if(!this.n){
this.n=mw.config.get("wgUserName");}
if(!this.w){
this.w=mw.util.wikiUrlencode(this.n);}
if(!FAdm.ns.sUser){
FAdm.ns.sUser=FAdm.ns.fetch(FAdm.ns.nUser);}
if(advanced&&!FAdm.ns.sUsers){
FAdm.ns.every=mw.config.get("wgNamespaceIds");
for(s in FAdm.ns.every){
if(FAdm.ns.every[s]===FAdm.ns.nUser){
FAdm.ns.sUsers=(FAdm.ns.sUsers?FAdm.ns.sUsers+"|"+s:"(?:");}}
FAdm.ns.sUsers=FAdm.ns.sUsers+")";}
};
FAdm.users.fidelity=function(){
var g=mw.config.get("wgUserGroups");
var i;
var n;
var r=false;
if(typeof(g)==="object"){
n=g.length;
for(i=0;i<n;i++){
r=(g[i]==="sysop");
if(r){
break;}}}
return r;
};
FAdm.users.flag=function(ask,advanced){
var s=this.i+(advanced?"*":"-")+"!";
this.familiar(ask,true,s);
};
FAdm.users.flush=function(){
this.familiar("Q",false,null);
this.familiar("R",false,null);
this.familiar("T",false,null);
};
FAdm.users.found=function(arrived){
var located=false;
var seek;
if(typeof(arrived)==="string"){
FAdm.users.fetch();
seek="[["+FAdm.ns.sUser+":"+FAdm.users.w+"|";
located=(arrived.indexOf(seek)>0);
}else if(typeof(arrived)==="object"){
}
if(typeof(window.deferred_action)==="function"){
window.deferred_action(located,true);}
};
FAdm.users.fragment=function(){
var s;
this.fetch();
if(!this.i){
s=this.n.replace(/~/g,"%7E").replace(/!/g,"%21");
this.i="!"+FAdm.str.dbName+"."+s+"~";}
};
FAdm.users.friend=function(ask,access,action){
var k=-2;
var query;
var source;
var stored=jQuery.cookie("fileAdm"+ask);
this.fragment();
if(typeof(stored)==="string"){
k=stored.indexOf(this.i);
}else{
stored="";}
if(k<0){
if(access>0){
query={action:"raw",curid:access};
source=mw.config.get("wgScript");
window.deferred_action=action;
jQuery.get(source,query,this.found);}
}else if(stored.charCodeAt(this.i.length)===42){
action(true,false);}
};
window.fileAdm_ClearCookies=function(){
mediaWiki.libs.fileAdm.users.flush();
return void(0);
};
};
mediaWiki.libs.fileAdm.bb.users(mediaWiki.libs.fileAdm,mediaWiki);
delete mediaWiki.libs.fileAdm.bb.users;
mediaWiki.libs.fileAdm.bb.wins=function(FAdm){
"use strict";
if(typeof FAdm.wins!=="object"){
FAdm.wins={};}
FAdm.wins.forwardMode=function(){
if(FAdm.opt.multiWin){
this.lot=FAdm.opt.fetch(FAdm.opt.multiWin,this.lot);}
};
FAdm.wins.forwardSingle=function(){
var hype;
var i;
var select="/wiki/";
this.forwardMode();
if(!FAdm.ns.sFile){
FAdm.ns.sFile=FAdm.ns.fetch(FAdm.ns.nFile);}
select=select+FAdm.ns.sFile+":";
for(i=0;i<document.links.length;i++){
hype=document.links[i];
if(hype.pathname.indexOf(select)>=0){
if(this.lot){
hype.target=this.single;
}else{
hype.removeAttribute("target");}}}
};
};
mediaWiki.libs.fileAdm.bb.wins(mediaWiki.libs.fileAdm);
delete mediaWiki.libs.fileAdm.bb.wins;
mediaWiki.libs.fileAdm.bb.auto=function(FAdm,mw){
"use strict";
FAdm.all.fire=function(){
var exec=false,learnt=false,lf;
if(mw.util.getParamValue("oldid")===null){
FAdm.ns.is=mw.config.get("wgNamespaceNumber");
switch(FAdm.ns.is){
case FAdm.ns.nSpecial:
FAdm.str.page.scp=mw.config.get("wgCanonicalSpecialPageName");
lf=(FAdm.str.page.scp==="Listfiles"||FAdm.str.page.scp==="Newimages");
if(lf){
exec=FAdm.guide.action;}
break;
case FAdm.ns.nProject:
case FAdm.ns.nOthers1:
FAdm.str.action=mw.config.get("wgAction");
if(FAdm.str.action==="view"){
exec=FAdm.guide.action;}
break;
case FAdm.ns.nFile:
FAdm.misc.pageid=mw.config.get("wgArticleId");
if(FAdm.misc.pageid>0){
exec=FAdm.file.action;}
break;
case FAdm.ns.nCat:
learnt=true;
FAdm.all.fit();
FAdm.str.page.title=mw.config.get("wgTitle");
if(!FAdm.str.page.title.indexOf(FAdm.cat.start)){
if(FAdm.str.page.title!==FAdm.cat.start){
exec=FAdm.cat.action;}}
break;}
if(exec){
if(!learnt){
FAdm.all.fit();}
if(exec){
jQuery(document).ready(exec);}}}
return void(0);
};
if(FAdm.identity===undefined){
FAdm.identity=FAdm.vsn;
mw.loader.state("w:de:WP:fileAdm","ready");
jQuery(document).trigger("loadWikiScript",["fileAdm",FAdm.vsn]);
mw.loader.using(["user","mediawiki.user","mediawiki.util","jquery.cookie"],FAdm.all.fire());
}else{
window.alert("fileAdm: multiple load -- may have destroyed configuration data");}
};
mediaWiki.libs.fileAdm.bb.auto(mediaWiki.libs.fileAdm,mediaWiki);
delete mediaWiki.libs.fileAdm.bb.auto;
/// end of fileAdm.js

</nowiki>