User:PerfektesChaos/js/pageTeaserHint/r.js: Difference between revisions

Content deleted Content added
1.0 dedicated to Andrea014
 
1.5
 
(One intermediate revision by the same user not shown)
Line 1:
/// User:PerfektesChaos/js/pageTeaserHint/r.js
/// 2020-12-27 PerfektesChaos@de.wikipedia
/// Fingerprint:#0#1D83D6773CDAA807#
/// License:CC-by-sa/4.0
///<nowiki>
(function(mw,$){
"use strict";
var Version=1.05,Signature="pageTeaserHint",Store="User:PerfektesChaos/js/"+Signature,PTH={core:{maxage:86400,site:"w:en",store:Store,sub:"core"},doc:{site:"w:en",store:Store},got:false,lazy:true,limited:true,paged:{"allpages":
{suite:".mw-allpages-nav",search:".mw-allpages-body"
},"category":
{suite:"#mw-pages",search:"#mw-pages"
},"contributions":
{suite:".mw-contributions-list",search:"#mw-content-text"
},"info":
{suite:"#mw-pageinfo-header-restrictions",search:false
Line 37 ⟶ 39:
function factory(area,at,$a){
var r=at;
if(area&&(area<0||!PTH.limited||area%2)){
r=false;}
if(r&&(area===2||area===6||area===8||area===14)){
r=false;}
if(r&&area&&!PTH.limited){
r=false;}
if(r){
Line 111 ⟶ 113:
switch(PTH.scope){
case "allpages":
case "contributions":
case "prefixindex":
case "whatlinkshere":
Line 125 ⟶ 128:
PTH.page.search=PTH.paged[PTH.scope].search;
if(PTH.page.search){
seek="a[href*=\"/wiki/\"]:not(a[href*=\"#\"])";
PTH.page.$container=$(PTH.page.search);
seek="a[href*=\"/wiki/\"]:not(a[href*=\"#\"])";
$got=PTH.page.$container.find(seek);
if($gotPTH.lengthscope!=="user"){
$got.eachnot(fiat".mw-parser-output a");}
$got.each(fiat);
}else{
finesse();}
Line 157 ⟶ 161:
switch(s){
case "Allpages":
case "Contributions":
case "Prefixindex":
case "Search":
Line 202 ⟶ 207:
src=obj.src.replace(PTH.re.spc,"_");
$r.attr({"src":"https://upload.wikimedia.org/wikipedia/commons/thumb/"+obj.sub.substr(0,1)+"/"+obj.sub+"/"+src+"/"+appear+"px-"+src+".png"
}).css({"display":"inline"});
});
}else{
window.console.log(Signature+".$file() s",access);}