Content deleted Content added
1.1 |
1.2 |
||
Line 1:
/// Gadget/fragmentAnchors/r.js
/// 2016-04-
/// Fingerprint:#0#
///<nowiki>
(function(mw,$){
"use strict";
var Version=1.
};
if(typeof mw.libs[FANCY]!=="object"||!mw.libs[FANCY]){
Line 11:
mw.libs[FANCY].type=FANCY;
FANCY=mw.libs[FANCY];
mw.hook("wikipage.content").add(FASC.furnish);}▼
FASC.cfg.live=false;▼
FASC.cfg.$portlet.hide();}
mw.loader.using(["jquery.tipsy"],feed);}▼
function fire(){
FANCY.doc="[[w:en:User:PerfektesChaos/js/"+FANCY.type+"]]";▼
if(mw.loader.getState(signature)!=="ready"){
mw.loader.state(signature,"ready");
FANCY.vsn=Version;▼
if(env.wgPageContentModel==="wikitext"){▼
FASC.locked=(env.wgAction==="view");▼
FASC.sign=FANCY.type;▼
FASC.cfg.live=false;
mw.loader.using(["user","mediawiki.util"],FASC.fire);}}}▼
FANCY.fetch=function(){
var dup,r,s;
Line 26 ⟶ 45:
return r;
};
FANCY.fire=function
var r=FASC.cfg.live;
▲mw.hook("wikipage.content").add(FASC.furnish);}
if(r){
▲function fiat(){
fiat();}
▲FASC.cfg.$portlet.hide();
return r;
▲mw.loader.using(["jquery.tipsy"],feed);}
};
▲function fire(){
FASC.cfg.element=function(attend,attributes,anchor){
▲var env=mw.config.get(["wgAction","wgPageContentModel"]);
return mw.html.element(attend,attributes,anchor);
▲FANCY.vsn=Version;
};
▲FANCY.doc="[[w:en:User:PerfektesChaos/js/"+FANCY.type+"]]";
FASC.cfg.escape=function(anchor){
▲mw.loader.state("ext.gadget."+FANCY.type,"ready");
return mw.html.escape(anchor);
▲if(env.wgPageContentModel==="wikitext"){
};
▲FASC.locked=(env.wgAction==="view");
▲FASC.sign=FANCY.type;
▲FASC.cfg.live=false;
▲mw.loader.using(["user","mediawiki.util"],FASC.fire);}}
FASC.cfg.fair=function(anchor){
var r=anchor.replace(/_/g," "),s;
Line 61 ⟶ 77:
};
FASC.cfg.fire=function(){
var lock,portlet;
var portlet=mw.util.addPortletLink("p-tb","#"," ","t-"+FASC.sign);▼
if(typeof FANCY.large==="boolean"){
FASC.large=FANCY.large;}
if(typeof FANCY.lock==="boolean"){
lock=FANCY.lock;}
if(!lock){
FASC.cfg.$portlet=$(portlet);
FASC.cfg.$portlet.append(FASC.$facet());
FASC.cfg.$portlet.click(fiat);
FASC.cfg.$portlet.attr({title:FASC.sign+" "+FASC.vsn});}
mw.hook(FANCY.type+".ready").fire(FANCY);
FASC.cfg.live=true;
Line 79 ⟶ 99:
$r.css({"height":n,"width":n});
if(alert){
$r.css({"background-color":"#FFFF00","border":"#FF0000 2px solid"
"padding":"1px"});}
return $r;
};
FASC.$factory=function(anchor,alert){
var sign=anchor.substr(1),lapse=(
if(!$r){
$i=FASC.$facet(alert,lapse);
Line 102 ⟶ 123:
$i=$r.children();
if(lapse){
show=
}else{
show=
$i.attr({"data-id":sign,"title":show});
$i.tipsy({gravity:"s",html:true,opacity:0.8});
Line 234 ⟶ 255:
$e=$inner.eq(i);
s=$e.attr("href");
if(s!=="#
$e.addClass(FASC.scope);
if(typeof total[s]!=="object"){
$e.before(FASC.$failure(s));
if(!FASC.want){
Line 242 ⟶ 264:
FASC.want[s]=FASC.want[s]+1;
}else{
FASC.want[s]=1;}}}}}
if(FASC.dup||FASC.want){
FASC.flag();}
|