Content deleted Content added
m oops |
update script: basic recognition of user contribs page, ability for user-defined positioning |
||
Line 6:
**
\* ======================================================== */
// the following settings are used in this script:
if (offlineAfter == null) var offlineAfter = (12 * 60); // number of seconds after which a user is considered offline (default: 12
if (statCloseOnClick == null) var statCloseOnClick = true; // whether to close the status window when clicking on it
if (statPosition == null) var statPosition = new Array(20, 600); // position of the status window [left, top]
//main script
Line 16 ⟶ 15:
this.launch = function() {
// launch helper. check whether there is a deletion tag on this page.
if ((wgNamespaceNumber == 2) || (wgNamespaceNumber == 3) || (window.___location.href.indexOf('Special:Contributions/') > -1)) {
this.control = new statusCheck_controller;
this.control.runCheck();
Line 25 ⟶ 24:
function statusCheck_controller() {
var statusCheck = this;
if (wgPageName == 'Special:Contributions') {
if (wgTitle.indexOf('/') > -1) { this.userName = wgTitle.substr(0, wgTitle.indexOf('/')); } else { this.userName = wgTitle; }▼
this.userName = window.___location.href.substr(window.___location.href.indexOf('Special:Contributions/') + 22);
if (this.userName == '') return false;
} else {
▲
}
this.runCheck = function(callback) {
Line 31 ⟶ 35:
default:
statusCheck.interface = new wa_window();
statusCheck.interface.win_left =
statusCheck.interface.win_top =
statusCheck.interface.win_width = 110;
statusCheck.interface.win_height = 35;
|