Content deleted Content added
2.3 |
2.4 |
||
Line 1:
/// Gadget/fragmentAnchors/r.js
///
/// Fingerprint:#0#
/// Documentation:[[w:en:User:PerfektesChaos/js/fragmentAnchors]]
///<nowiki>
(function(mw,$){
"use strict";
var Version=2.
},EXPORT={},OO;
function facet($area){
Line 76:
return mw.html.escape(anchor);
};
FASC.cfg.fair=function(anchor,allow){
var r
if(allow){
if(typeof FASC.wikiAnchor!=="object"){▼
r=anchor;
}else{
r=anchor.replace(/_/g," ");}
▲if(typeof FASC.cfg.wikiAnchor!=="object"){
s="[0-9A-Fa-f]";
s="\\.("+s+s+")";
FASC.cfg.wikiAnchor=new RegExp(s,"g");}
try{
s=r.replace(FASC.cfg.wikiAnchor,"%$1");
r=decodeURIComponent(s);
}catch(e){
}
return r;
};
FASC.cfg.familiar=function(anchor,$at){
var s=FASC.cfg.fair(anchor,true),r,$e;
if(s!==anchor&&$at.is("span")){
$e=$at.next();
r=($e.is("span")&&"#"+$e.attr("id")===s);
if(!r){
$e=$at.prev();
r=($e.is("span")&&"#"+$e.attr("id")===s);}}
return r;
};
Line 325 ⟶ 339:
s="#"+$e.attr("id");
if(FASC.filter(s)){
if(FASC.cfg.familiar(s,$e)){
s=false;}
}else{
s=false;}
if(s){
if(typeof total[s]==="object"){
if(typeof FASC.dup[s]!=="object"){
|