Content deleted Content added
fix for deprecated wikibits function hookEvent |
Migration: wg* → mw.config.get('wg*'); +Missing '()' invoking a constructor and missing semicolons. |
||
Line 15:
this.launch = function() {
// launch helper. check whether there is a deletion tag on this page.
if ((mw.config.get('wgNamespaceNumber') == 2) || (mw.config.get('wgNamespaceNumber') == 3) || (window.___location.href.indexOf('Special:Contributions/') > -1)) {
this.control = new statusCheck_controller();
this.control.runCheck();
} else { return false; /* do nothing!*/ }
};
}
function statusCheck_controller() {
var statusCheck = this;
if (mw.config.get('wgPageName') == 'Special:Contributions') {
this.userName = window.___location.href.substr(window.___location.href.indexOf('Special:Contributions/') + 22);
if (this.userName == '') return false;
} else {
if (mw.config.get('wgTitle').indexOf('/') > -1) { this.userName = mw.config.get('wgTitle').substr(0, mw.config.get('wgTitle').indexOf('/')); } else { this.userName = mw.config.get('wgTitle'); }
}
Line 108:
case '4':
var contribsLink = '(<a href="'+mw.config.get('wgServer')+mw.config.get('wgArticlePath').replace('$1','Special:Contributions')+'/'+statusCheck.userName+'">contribs</a>)';
if (statusCheck.online == true) {
Line 129:
break;
}
};
}
Line 137:
function launchstatusCheck() {
// lib proto
wa_window.prototype = new wa_document();
wa_element.prototype = new wa_document();
// init object
var obj_statusCheck = new statusCheck();
obj_statusCheck.launch();
|