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

Content deleted Content added
2.2
2.3
Line 1:
/// Gadget/fragmentAnchors/r.js
/// 20162017-0903-21 19 PerfektesChaos@de.wikipedia
/// Fingerprint:#0#2B008E8D61C1C34A#
/// Documentation:[[w:en:User:PerfektesChaos/js/fragmentAnchors]]
///<nowiki>
(function(mw,$){
"use strict";
var Version=2.23,FANCY="fragmentAnchors",FASC={cfg:{},siblings:"error-repeated-id",source0:"6/62/Anchor_pictogram.svg",source1:"d/d6/Anchor_pictogram_red.svg",unStart:["wpTextbox","/maplink/","Anker:"],vsn:Version
},EXPORT={},OO;
function facet($area){
Line 135 ⟶ 136:
badge.$i.addClass(FASC.siblings);}
badge.$s=$("<span>");
badge.$s.css({"font-size":"25%"}).text(" ");
badge.$s.text(" ");
badge.$r=$("<span>");
badge.$r.append(badge.$s);
Line 142:
$r=badge.$r.clone();
$i=badge.$i.clone();
$r.append($i).append(badge.$s.clone());
$r.append(badge.$s.clone());
$i.hover(function(activity){
FASC.flip(activity,about,0,true);
Line 155 ⟶ 154:
return false;
});
about.$imgspan=$ir;
return $r;
};
Line 194 ⟶ 193:
};
FASC.fiat=function(about,action){
var illusive=0.75,margin=10,options={align:"center",anchor:true,horizontalPosition:"center",padded:false,verticalPosition:"below"},show=about.sign,sign=FASC.sign+(action?"-t":"-i")+about.id,$i=about.$img,$p=$("<span>"),offset,r,$e;
$p.css({"left":(-0.5*about.$span.innerWidth()-1)+"px","position":"relative",
"top":"3px"});
FASCabout.$bodyspan.append($ep);
options.$floatableContainer=$p;
$p=$("<span>");
if(show){
show=(action?"#":"")+FASC.cfg.escape(show);
Line 222 ⟶ 226:
$p.detach().css({"visibility":"visible"});
options.$content=$p;
offset=$i.offset();
offset.top+=$i.innerHeight()+margin;
r=new OO.ui.PopupWidget(options);
r.$efloatable.attr({"role":"tooltip"}).css({"opacity":illusive,
$e=r.$element;
"padding":"2px","text-align":"center"});
$e.attr({"role":"tooltip"}).css({"opacity":illusive,
FASC.$body.append(r.$floatable);
"padding":"2px","text-align":"center"})
.offset(offset);
FASC.$body.append($e);
return r;
};
FASC.file=function(anchor,alert,$a){
var sign=anchor.substr(1),lapse=(!FASC.fine(sign)),mode=(alert?1:(lapse?2:0)),id=FASC.bubbles.length,bubble={id:id,mode:mode,popups:[false,false],sign:sign,live:false,$a:$a,$imgspan:false};
FASC.bubbles.push(bubble);
$a.attr({"title":null});