Utente:Genuzzo/monobook.js: differenze tra le versioni
Vai alla navigazione
Vai alla ricerca
Contenuto aggiunto Contenuto cancellato
Genuzzo (rosica | curriculum) Nessun oggetto della modifica |
Genuzzo (rosica | curriculum) 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]; |
||
text = text.replace('.', ''); |
|||
myCounter.setValue(text); |
|||
if(initialized = 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') { |
||
⚫ | |||
setInterval(function() { |
setInterval(function() { |
||
var xhr; |
var xhr; |
||
Riga 30: | Riga 35: | ||
} |
} |
||
else |
else |
||
alert('Qualcosa è andata storto. O |
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); |