User:PerfektesChaos/js/pageTeaserHint/core/r.js

/// User:PerfektesChaos/js/pageTeaserHint/core/r.js /// 2020-12-27 PerfektesChaos@de.wikipedia /// Fingerprint:#0#29D0BC42# /// License:CC-by-sa/4.0 /// (function(mw,$){ "use strict"; var Version=1.5,Signature="pageTeaserHint",Sub="core",PTHC={trigger:{large:true,src:"OOjs UI icon camera-invert.svg",sub:"c2" } },API={Api:false,badges:[17437796,17437798,17506997,17580674,70893996,70894304],errors:false,max:10,msec:100,more:3,scream:false,server:"api/rest_v1/",site:false,solver:false,summary:"page/summary",$ajax:false},BABEL={dict:false,dictionary:false,lower:false,maxDays:30,translate:false},HTML={badge:{src:"OOjs UI icon ribbonPrize.svg",sub:"d3"},codepages:{"css":"CSS", "javascript":"JavaScript", "json":"JSON", "scribunto":"Lua"}, columns:{allpages:".mw-allpages-body",category:".mw-category",prefixindex:".mw-prefixindex-body"},css:{box:{"border":"2px solid #808080", "padding-left":"0.5em", "padding-right":"0.5em", "padding-bottom":"3px"}, extr:{"display":"block", "max-height":"15em", "overflow":"auto"},prvw:{"border":"1px solid #808080", "border-radius":"0.5em", "display":"table", "margin-top":"3px", "margin-bottom":"3px", "padding-left":"0.5em", "padding-right":"0.5em"}},d:["redir","shorty","wikidata","extract","var"],disambig:{"ltr":{src:"Disambig-dark.svg",sub:"ea"}, "rtl":{src:"Disambig arabic.svg", sub:"17"} },e:["item","story","info","stamp","size","disambig","merits","protected","watching"],info:{src:"OOjs UI icon info-progressive.svg",sub:"5f"},less:false,list:false,mag:22,protect:{src:"OOjs UI icon unLock-ltr.svg",sub:"ab"},redir:{"ltr":{src:"OOjs UI icon newline-rtl.svg",sub:"5d"}, "rtl":{src:"OOjs UI icon newline-ltr.svg", sub:"3c"} },sysop:{src:"OOjs UI icon lock-ltr-destructive.svg",sub:"e6"},wikidata:{src:"Wikidata.svg",sub:"71"} },QUEUE={lonely:true,mode:0},REPOS; function fired(apply){ var heritage=["doc","$file","furnish","got","page","re","scope","selector","$widget"],cnf,i,s,sign; if(typeof apply==="object"&&apply&&typeof apply.scope==="string"&&apply.scope){ mw.hook(Signature+".init").remove(fired); for(i=0;i<heritage.length;i++){ sign=heritage[i]; cnf=apply[sign]; if(cnf){ s=typeof cnf; if(s!=="function"){ if(s!==(sign.substr(0,1)==="s"?"string":"object")){ s=false;}} if(s){ PTHC[sign]=cnf;}}} if(typeof apply.$file==="function"){ PTHC.$file=apply.$file; }else{ PTHC.$file=function{};} if(typeof apply.pub==="object"&&apply.pub){ heritage=apply.pub; if(typeof heritage.type==="string"){ PTHC.pub.typeParent=heritage.type;} if(typeof heritage.vsn==="number"){ PTHC.pub.vsnParent=heritage.vsn;} if(typeof heritage.doc==="string"){ PTHC.doc=heritage.doc;}} if(typeof apply.REPOS==="object"&&apply.REPOS){ REPOS=apply.REPOS;} if(typeof apply.ltr==="boolean"){ PTHC.ltr=apply.ltr; }else{ PTHC.ltr=true;} cnf=mw.config.get(["wgUserLanguage","wgUserName"]); PTHC.slang=cnf.wgUserLanguage.toLowerCase; PTHC.listen=cnf.wgUserName; BABEL.fire; mw.hook(Signature+".clear").add(BABEL.flat); QUEUE.fire;}} function first{ var signature=Signature+"/"+Sub,rls; PTHC.signature="ext.gadget."+signature; if(mw.loader.getState(PTHC.signature)!=="ready"){ rls={}; rls[PTHC.signature]="ready"; mw.loader.state(rls); PTHC.pub={type:signature,vsn:Version}; mw.hook(signature+".ready").fire(PTHC.pub); mw.hook(Signature+".init").add(fired);}} API.fault=function(jqXHR,textStatus,errorThrown){ API.more=API.more-1; if(textStatus){ switch(typeof textStatus){ case "object": if(typeof textStatus.textStatus==="string"){ API.scream=textStatus.textStatus; }else{ API.scream="";} if(typeof textStatus.exception==="string"&&textStatus.exception){ API.scream=API.scream+" ("+textStatus.exception+")";} break; case "string": API.scream=textStatus; break;}} if(errorThrown){ if(API.scream){ API.scream=API.scream+" -- Error: ";} API.scream=API.scream+errorThrown;} if(!API.scream){ API.scream="???";} if(typeof window.console==="object"&&typeof window.console.log==="function"){ window.console.log(Signature+" * "+API.scream); if(typeof textStatus==="object"&&textStatus&&typeof window.console.dir==="function"){ window.console.dir(textStatus);}} API.errors=false; if(API.multi>0){ API.finish; }else{ API.fetch;} }; API.fetch=function{ var got,s; if(API.n>0){ API.n--; s=API.requests[API.n]; got=PTHC.got[s]; if(s.indexOf(" ")>0){ s=s.replace(PTHC.re.usc,"_");} API.page.url=API.solver+encodeURIComponent(s); $.ajax(API.page).done(API.found).fail(API.fault); }else{ API.page=false; API.requests=false; API.finish;} }; API.find=function(ask,another){ if(another){ API.query["continue"]=another;} API.query.titles=ask; API.Api.get(API.query).done(API.found).fail(API.fault); }; API.fire=function(all,action,after){ var i; API.requests=all; API.finish=after; API.n=API.requests.length; if(API.n>0){ if(!API.Api){ API.Api=new mw.Api;} API.scope=action; API.i=0; switch(API.scope){ case "info": API.multi=API.max; API.query={action:"query", "continue":"", prop:"info",inprop:"protection|watched" }; break; case "pageprops": for(i=0;i<API.badges.length;i++){ API.badges[i]="wikibase-badge-Q"+API.badges[i];} API.multi=API.max; API.query={action:"query", "continue":"", prop:"pageprops",redirects:"",ppprop:"disambiguation"+"|displaytitle"+"|wikibase_item"+"|wikibase-shortdesc" }; for(i=0;i0){ n=API.n-API.multi; k=(n<0?0:n); requests=[]; for(i=k;i<API.n;i++){ requests.push(API.requests[i]);} API.n=n; API.find(requests,another); }else{ API.requests=false; API.finish;} }; API.foreign=function(array,after){ if(!API.Api){ API.Api=new mw.Api;} API.Api.getMessages(array).done(after).fail(API.fault); }; API.found=function(arrived){ var got,i,id,page,query,redir,s,sign; if(typeof arrived==="object"&&arrived){ if(API.multi<0){ if(typeof arrived.title==="string"&&typeof PTHC.got[arrived.title]==="object"){ got=PTHC.got[arrived.title]; if(typeof arrived.description==="string"){ s="story"; if(typeof arrived.description_source==="string"&&arrived.description_source!=="central"){ s="shorty";} got[s]=arrived.description;} if(typeof arrived.displaytitle==="string"){ got.show=arrived.displaytitle;} if(typeof arrived.extract_html==="string"&&arrived.extract_html){ got.extract={ltr:null,summary:arrived.extract_html}; if(typeof arrived.lang==="string"&&arrived.lang){ got.extract.slang=arrived.lang; if(typeof arrived.dir==="string"&&arrived.dir){ got.extract.ltr=(arrived.dir!=="rtl");}}} if(typeof arrived.thumbnail==="object"){ got.thumb=arrived.thumbnail; QUEUE.lonely=false;} if(typeof arrived.timestamp==="string"){ got.stamp=arrived.timestamp;}} window.setTimeout(API.fetch,API.msec); }else{ if(typeof arrived.query==="object"){ query=arrived.query; if(typeof query.pages==="object"){ for(id in query.pages){ page=query.pages[id]; sign=page.title; if(API.scope==="pageprops"&&typeof page[API.scope]==="object"){ page=page[API.scope];} if(typeof PTHC.got[sign]==="object"){ got=PTHC.got[sign]; if(typeof page.displaytitle==="string"){ got.show=page.displaytitle;} if(typeof page.contentmodel==="string"&&page.contentmodel!=="wikitext"){ got.stuff=page.contentmodel;} if(typeof page.disambiguation==="string"){ got.linked=true;} if(typeof page.length==="number"){ got.kBytes=Math.ceil(page.length*0.001);} if(typeof page.pagelanguage==="string"){ got.slang=page.pagelanguage; if(typeof page.pagelanguagedir==="string"&&page.pagelanguagedir==="rtl"){ got.ltr=false;}} if(typeof page.protection==="object"&&typeof page.protection.length==="number"&&page.protection.length){ got.protection=page.protection;} if(PTHC.listen&&API.scope==="info"){ got.listen=(typeof page.watched==="string");} if(typeof page.wikibase_item==="string"){ s=page.wikibase_item.substr(1); got.item=parseInt(s,10);} if(typeof page["wikibase-shortdesc"]==="string"){ got.shorty=page["wikibase-shortdesc"];} if(API.scope==="pageprops"){ for(i=0;i<API.badges.length;i++){ s=API.badges[i]; if(typeof page[s]==="string"){ got.merits=true; break;}}} HTML.follow(sign,got,API.scope);}} if(typeof query.redirects==="object"){ for(i=0;i<query.redirects.length;i++){ redir=query.redirects[i]; sign=redir.from; if(typeof PTHC.got[sign]==="object"){ got=PTHC.got[sign]; got.shift=redir.to; HTML.follow(sign,got,API.scope);}}}}} API.follower;}} API.scream=false; }; BABEL.def={ "author":"protect-level-author", "autoconfirmed":"protect-level-autoconfirmed", "badge":"Wikibase-pageswithbadges-badge", "banner-protect":"protect-level-banner-protect", "centralnotice-admin":"protect-level-centralnotice-admin", "create":"restriction-create", "disambig":"Visualeditor-dialog-meta-settings-disambiguation-label", "edit":"restriction-edit", "editautopatrolprotected":"protect-level-editautopatrolprotected", "editeditorprotected":"protect-level-editeditorprotected", "editor":"protect-level-editor", "editextendedsemiprotected":"protect-level-editextendedsemiprotected", "extendedconfirmed":"protect-level-extendedconfirmed", "images":"coll-images-title", "infinity":"infiniteblock", "kilobyte":"Kilobytes", "megabyte":"Megabytes", "move":"restriction-move", "pageinfo":"pageinfo", "redirect":"redirectpagesub", "sysop":"protect-level-sysop", "templateeditor":"protect-level-templateeditor", "unwatch":"unwatch", "watch":"watch", "wikidata":"project-localized-name-wikidatawiki" }; BABEL.fair=function(at){ var iY=at.substr(0,4),iM=at.substr(5,2),iD=at.substr(8,2),ih=at.substr(11,2),im=at.substr(14,2),is=at.substr(17,2),date=new Date(iY,iM-1,iD,ih,im,is); date.setMinutes(date.getMinutes-date.getTimezoneOffset); return date.toLocaleString; }; BABEL.fire=function{ var date,less,load,repo,s,stored; if(typeof mw.storage==="object"&&mw.storage&&typeof mw.storage.get==="function"&&typeof mw.storage.remove==="function"&&typeof mw.storage.set==="function"){ if(!BABEL.translate){ BABEL.slang=PTHC.slang.toLowerCase; BABEL.translate={}; for(s in BABEL.def){ stored=BABEL.def[s]; BABEL.translate[s]=stored;}} if(typeof BABEL.dict!=="object"){ stored=mw.storage.get(Signature); if(stored){ try{ repo=JSON.parse(stored); if(typeof repo==="object"&&repo){ BABEL.dictionary=repo; if(typeof repo.next==="number"){ date=new Date; if(repo.next<date.getTime){ load=true;}} if(typeof BABEL.dictionary[BABEL.slang]==="object"){ BABEL.dict=BABEL.dictionary[BABEL.slang]; }else{ load=true;} }else{ less=true;} }catch(ex){ less=true;} }else{ load=true;}} if(less||BABEL.lower){ mw.storage.remove(Signature); BABEL.lower=false; load=true;} if(load){ BABEL.fresh;}} }; BABEL.flat=function{ BABEL.lower=true; BABEL.fire; }; BABEL.fresh=function{ var q=[],s; for(s in BABEL.translate){ q.push(BABEL.translate[s]);} API.foreign(q,BABEL.freshed); }; BABEL.freshed=function(arrived){ var date=new Date,s; if(typeof BABEL.dictionary!=="object"){ BABEL.dictionary={};} BABEL.dictionary.next=date.getTime+BABEL.maxDays*86400000; if(typeof BABEL.dictionary[BABEL.slang]!=="object"){ BABEL.dictionary[BABEL.slang]={};} BABEL.dict=BABEL.dictionary[BABEL.slang]; for(s in arrived){ if(arrived[s]){ BABEL.dict[s]=arrived[s];}} BABEL.dictionary[BABEL.slang]=BABEL.dict; mw.storage.set(Signature,JSON.stringify(BABEL.dictionary)); }; BABEL.from=function(alien){ var r,s; if(BABEL.translate&&typeof BABEL.translate[alien]==="string"){ s=BABEL.translate[alien]; if(s&&BABEL.dict&&typeof BABEL.dict[s]==="string"){ r=BABEL.dict[s];}} return r||s||alien; }; HTML.face=function($area,add){ if(add.slang){ $area.attr("lang",add.slang); if(add.ltr!==PTHC.ltr){ $area.attr("dir",(add.ltr?"ltr":"rtl"));}} }; HTML.$factory=function($area,at,add){ var e,i,s,s2,$e,$img; switch(at){ case "redir": s=(PTHC.ltr?"margin-right":"margin-left"); $img=PTHC.$file(HTML.redir,HTML.mag); $img.attr({"title":BABEL.from("redirect")}).css(s,"0.5em"); $area.prepend($img); $e=$(""); $e.attr({"href":mw.util.getUrl(add,{action:"view"})}).text(add); $area.append($e); break; case "shorty": $area.text(add.shorty); HTML.face($area,add); break; case "item": s=(PTHC.ltr?"margin-right":"margin-left"); $img=PTHC.$file(HTML.wikidata,HTML.mag); $e=$(""); $e.append($img).attr({"href":"https://www.wikidata.org/wiki/Q"+add, "title":BABEL.from("wikidata")+" Q"+add}); $area.prepend($e); break; case "story": s=(PTHC.ltr?"margin-left":"margin-right"); $e=$(" "); $e.css(s,"2em").text(add.story); HTML.face($e,add); $area.append($e); break; case "extract": s=add.summary; if(s.indexOf("\n")>0){ if(typeof PTHC.re.eol){ PTHC.re.eol=new RegExp("\n()","g");} s=s.replace(PTHC.re.eol,"$1");} $e=$(" "); $e.addClass(PTHC.selector+"extracted").html(s); if(PTHC.scope!=="search"){ } HTML.face($e,add); $area.css(HTML.css.prvw).append($e); break; case "info": s=(PTHC.ltr?"margin-right":"margin-left"); $e=$(""); $e.attr({"href":mw.util.getUrl(add,{action:"info"}), "title":BABEL.from("pageinfo")}).css(s,"1em"); $img=PTHC.$file(HTML.info,HTML.mag); $e.append($img); $area.prepend($e); break; case "stamp": $e=$(" "); $e.attr({"title":BABEL.fair(add)}).css({"margin-left":"1em", "margin-right":"1em", "white-space":"nowrap"}).text(add.substr(0,10)+" "+add.substr(11,5)); $area.append($e); break; case "size": if(add>1077){ i=Math.floor(add*0.00097); s="MB"; s2="megabyte"; }else{ i=add; s="kB"; s2="kilobyte";} $e=$(" "); $e.attr({"title":BABEL.from(s2)}).css({"margin-left":"1em", "margin-right":"1em", "white-space":"nowrap"}).text(i+" "+s); $area.append($e); break; case "disambig": $img=PTHC.$file(HTML.disambig,HTML.mag); $img.attr({"title":BABEL.from("disambig")}).css({"margin-left":"1em", "margin-right":"1em"}); $area.append($img); break; case "model": $e=$(" "); s=add.toLowerCase; if(typeof HTML.codepages[s]==="string"){ s=HTML.codepages[s];} $e.text(s).css({"margin-left":"1em", "margin-right":"1em"}); $area.append($e); break; case "merits": $e=$(" "); $img=PTHC.$file(HTML.badge,HTML.mag); $e.append($img).css({"margin-left":"1em", "margin-right":"1em"}); $area.append($e); break; case "protected": if(add.length>1&&add[0].type==="edit"&&add[0].level==="sysop"&&add[1].type==="move"&&add[1].level==="sysop"){ s="sysop"; }else{ s="protect";} $img=PTHC.$file(HTML[s],HTML.mag); s=""; for(i=0;i<add.length;i++){ e=add[i]; if(typeof e.type==="string"&&typeof e.level==="string"){ if(s){ s=s+String.fromCharCode(0xA0,0x7C,0x20,0x0A);} s=s+BABEL.from(e.type)+String.fromCharCode(0xA0,0x2013,0x20)+BABEL.from(e.level); if(typeof e.expiry==="string"&&e.expiry==="infinity"){ s=s+String.fromCharCode(0xA0,0x2F,0x20)+BABEL.from(e.expiry);}}} if(s){ $img.attr({"title":s});} $img.css({"margin-left":"1em", "margin-right":"1em"}); $area.append($img); break; case "watching": s=(add.listen?"un":"")+"watch"; i=(add.listen?0x2605:0x2606); $e=$(""); $e.attr({href:mw.util.getUrl(add.slot,{action:s}),title:BABEL.from(s)}).css("padding-"+(PTHC.ltr?"left":"right"),"1em").text(String.fromCharCode(i)); $area.append($e); break;} }; HTML.fiat=function(about,$area,at,append,add){ switch(at){ case "redir": $area.append(HTML.$factory($area,"redir",add)); break; case "shorty": $area.append(HTML.$factory($area,"shorty",add)); break; case "wikidata": if(append){ $area.append(HTML.$factory($area,"story",add)); }else{ $area.prepend(HTML.$factory($area,"item",add));} break; case "extract": $area.append(HTML.$factory($area,"extract",add)); break; case "var": $area.append(HTML.$factory($area,append,add)); break;} }; HTML.fill=function(about,at,append,add){ var i,live,s,$d,$previous; if(about[at]){ $d=about[at]; live=true; }else{ for(i=0;i":" "); $d=$(s); $d.addClass(PTHC.selector+at); if($previous){ $previous.after($d); }else if(!HTML.list){ about.$box.append($d);} about[at]=$d;} if(append&&!about[append]){ live=false;} if(!live){ HTML.fiat(about,$d,at,append,add); about[append]=true;} }; HTML.finesse=function{ var got,s,$div; for(s in PTHC.got){ got=PTHC.got[s]; break;} if(got&&got.extract){ $div=$(" "); HTML.$factory($div,"extract",got.extract); PTHC.$widget.before($div);} }; HTML.first=function(at,assigned,$a){ var r={$a:$a},i,s,$parent; for(i=0;i<HTML.d.length;i++){ r[HTML.d[i]]=false;} for(i=0;i<HTML.e.length;i++){ r[HTML.e[i]]=false;} if(HTML.list){ r.dt=$a.parents("dt"); if(assigned.shift){ s=mw.util.getUrl(at,{redirect:"no"}); }else{ s=mw.util.getUrl(at,{action:"view"});} $a.attr({"href":s}).css({"font-weight":"bold"}); }else{ r.$box=$(" "); r.$box.addClass(PTHC.selector+"box").css(HTML.css.box); $parent=$a.parents("li.mw-search-result"); $parent.append(r.$box).css({"clear":"both"}); s=mw.util.getUrl(at,{action:"view"}); $a.attr({"href":s});} HTML.full(assigned,r,at); return r; }; HTML.flat=function($area){ $area.css({"columns":"1", "-khtml-columns":"1", "-moz-columns":"1", "-ms-columns":"1", "-webkit-columns":"1"}); }; HTML.flip=function{ var i,k,$cont,$dl,$dt,$exclude,$li,$lis,$ul,$uls,$up; if(PTHC.scope!=="user"){ $exclude=PTHC.page.$container.find(".mw-parser-output ul");} HTML.d.unshift("dt"); HTML.less=(PTHC.scope==="contributions"); HTML.list=true; HTML.flat(PTHC.page.$container); if(typeof HTML.columns[PTHC.scope]==="string"){ $cont=PTHC.page.$container.find(HTML.columns[PTHC.scope]); HTML.flat($cont);} $uls=PTHC.page.$container.find("ul > li > ul"); if($uls.length){ if($exclude){ $uls=$uls.not($exclude);} for(i=0;i<$uls.length;i++){ $ul=$uls.eq(i); $up=$ul.parent; $lis=$ul.children("li"); for(k=0;k<$lis.length;k++){ $li=$lis.eq(k); $li.detach; $up.before($li);} $up.remove;}} $uls=PTHC.page.$container.find("ul"); if($uls.length){ if($exclude){ $uls=$uls.not($exclude);} for(i=0;i<$uls.length;i++){ $ul=$uls.eq(i); $lis=$ul.children("li"); if($lis.length){ $dl=$(""); for(k=0;k<$lis.length;k++){ $li=$lis.eq(k); $dt=$(""); $cont=$li.contents; $cont.detach; $dt.append($cont).css({"font-weight":"normal"}); $dl.append($dt); $li.remove;} $ul.before($dl);} $ul.remove;}} }; HTML.floats=function{ var got,i,s,$div,$dt,$img; for(s in PTHC.got){ got=PTHC.got[s]; if(got.thumb){ $div=$(" "); if(PTHC.ltr){ $div.css({"float":"right", "margin-left":"1em"}); }else{ $div.css({"float":"left", "margin-right":"1em"});} $div.css({"margin-bottom":"0.5em", "margin-top":"0.5em"}); $img=$(" "); $img.attr({src:got.thumb.source,height:got.thumb.height,width:got.thumb.width}).css({"display":"inline"}); $div.append($img); if(HTML.list){ for(i=0;i<got.dl.length;i++){ $dt=got.dl[i].dt; $dt.css({"clear":"both"}).append($div);} }else{ got.div.$box.prepend($div);}}} }; HTML.flop=function{ var css={ol:"decimal",ul:"disc"},sel="."+PTHC.selector+"extracted",set=sel+"{",s; for(s in HTML.css.extr){ set=set+s+":"+HTML.css.extr[s]+";";} set=set+"}"; for(s in css){ set=set+sel+" "+s+" li{list-style:"+css[s]+" none outside;padding-bottom:0;}";} mw.util.addCSS(set); HTML.less=true; }; HTML.follow=function(at,assigned,about){ var i; switch(about){ case "pageprops": if(typeof assigned.ul==="object"&&typeof assigned.ul.length==="number"){ if(PTHC.scope==="search"){ assigned.div=HTML.first(at,assigned,assigned.ul[0]); }else{ assigned.dl=[]; for(i=0;i<assigned.ul.length;i++){ assigned.dl[i]=HTML.first(at,assigned,assigned.ul[i]);}} delete assigned.ul;} break; case "summary": switch(PTHC.scope){ case "info": break; case "search": HTML.full(assigned,assigned.div,at); break; default: if(typeof assigned.dl==="object"){ for(i=0;i<assigned.dl.length;i++){ HTML.full(assigned,assigned.dl[i],at);}}} break; case "info": if(PTHC.scope==="search"){ HTML.full(assigned,assigned.div,at); }else if(typeof assigned.dl==="object"){ for(i=0;i<assigned.dl.length;i++){ HTML.full(assigned,assigned.dl[i],at);}} break;} }; HTML.follower=function{ var s; for(s in PTHC.got){ HTML.follow(s,PTHC.got[s],"info");} }; HTML.full=function(assigned,about,at){ about.$a.html(assigned.show); if(assigned.linked){ about.$a.addClass("mw-disambig");} if(assigned.shift){ HTML.fill(about,"redir",false,assigned.shift);} if(assigned.shorty){ HTML.fill(about,"shorty",false,assigned);} if(assigned.item){ HTML.fill(about,"wikidata",false,assigned.item);} if(assigned.story){ HTML.fill(about,"wikidata","story",assigned);} if(assigned.extract){ HTML.fill(about,"extract",false,assigned.extract);} HTML.fill(about,"var","info",at); if(!HTML.less){ if(assigned.stamp){ HTML.fill(about,"var","stamp",assigned.stamp);} if(assigned.kBytes>0){ HTML.fill(about,"var","size",assigned.kBytes);}} if(assigned.linked){ HTML.fill(about,"var","disambig");} if(assigned.stuff&&API.scope==="info"){ HTML.fill(about,"var","model",assigned.stuff);} if(assigned.merits&&API.scope==="info"){ HTML.fill(about,"var","merits",assigned.merits);} if(assigned.protection){ HTML.fill(about,"var","protected",assigned.protection);} if(PTHC.listen&&typeof assigned.listen==="boolean"){ HTML.fill(about,"var","watching",{listen:assigned.listen,slot:at});} }; QUEUE.fire=function{ var s,got; if(!QUEUE.mode){ switch(PTHC.scope){ case "info": QUEUE.mode=2; break; case "search": QUEUE.mode=1; HTML.flop; break; default: QUEUE.mode=1; HTML.flip;} QUEUE.got=[]; for(s in PTHC.got){ got=PTHC.got[s]; QUEUE.got.push(s); got.extract=false; got.item=0; got.kBytes=-1; got.merits=0; got.linked=false; got.listen=null; got.ltr=PTHC.ltr; got.shift=false; got.shorty=false; got.slang=false; got.source=false; got.stamp=false; got.story=false; got.stuff=false; got.thumb=false;}} switch(QUEUE.mode){ case 1: API.fire(QUEUE.got,"pageprops",QUEUE.fire); break; case 2: API.fire(QUEUE.got,"summary",QUEUE.fire); break; case 3: if(PTHC.scope==="info"){ QUEUE.mode++; HTML.finesse; }else if(PTHC.listen){ API.fire(QUEUE.got,"info",QUEUE.fire); break; }else{ HTML.follower;} default: PTHC.$widget.empty; if(!QUEUE.lonely&&PTHC.scope!=="info"){ QUEUE.lonely=true; QUEUE.floats;}} QUEUE.mode++; }; QUEUE.floats=function(ask){ if(ask){ QUEUE.fire; HTML.floats; }else{ PTHC.trigger.fiat=QUEUE.floats; PTHC.trigger.fetch=BABEL.from; PTHC.trigger.support=BABEL.from("images"); PTHC.furnish(PTHC.trigger);} }; first; }(window.mediaWiki,window.jQuery)); /// EOF pageTeaserHint/core/r.js