Utente:Genuzzo/monobook.js: differenze tra le versioni

Vai alla navigazione Vai alla ricerca
Contenuto aggiunto Contenuto cancellato
Nessun oggetto della modifica
Nessun oggetto della modifica
Riga 4: Riga 4:
text = text.split('>')[1];
text = text.split('>')[1];
text = text.split('\n')[0];
text = text.split('\n')[0];
myCounter.setValue(text.replace('.', ''));
text = text.replace('.', '');
myCounter.setValue(text);
if(initialized = false) {
myCounter = new flipCounter('flip-counter', {value: text, inc:0, pace:0, auto:false});
initialized = true;
}
}
}
function initializeCoolCounter() {
function initializeCoolCounter() {
urll = '../../api.php?action=parse&text={{NUMBEROFEDITS}}&format=xml';
urll = '../../api.php?action=parse&text={{NUMBEROFEDITS}}&format=xml';
initialized = false;
if(wgPageName == 'Utente:Genuzzo/Counter') {
if(wgPageName == 'Utente:Genuzzo/Counter') {
myCounter = new flipCounter('flip-counter', {value:0, inc:0, pace:0, auto:false});
setInterval(function() {
setInterval(function() {
var xhr;
var xhr;
Riga 30: Riga 35:
}
}
else
else
alert('Qualcosa è andata storto. O wiki ci ha scoperto. SCAPPAAAAAAAAAAAAA');
alert('Qualcosa è andata storto. O wikia ci ha scoperto. SCAPPAAAAAAAAAAAAA');
}
}
};
};
Riga 36: Riga 41:
xhr.open('GET', urll, true);
xhr.open('GET', urll, true);
xhr.send(null);
xhr.send(null);
}
}}, 5000);
}
}, 5000);
}
}
}
addOnloadHook(initializeCoolCounter);
addOnloadHook(initializeCoolCounter);