Gebruiker:Rots61/Gadget-TestGadget.js: verschil tussen versies
Naar navigatie springen
Naar zoeken springen
(Doorverwijzing naar Gebruiker:Rots61/Gadget-LogTheCounter.js verwijderd) Label: Doorverwijzing verwijderd |
|||
Regel 3: | Regel 3: | ||
function TS () { |
function TS () { |
||
+ | if (document.visibilityState === 'visible') { |
||
− | + | titelnummerTS += 1; |
|
+ | } else { |
||
+ | document.title = 'NZ' + titelnummerTS; |
||
+ | } |
||
document.title = titelnummerTS; |
document.title = titelnummerTS; |
||
} |
} |
||
+ | if (mw.config.get('wgTitle').toLowerCase().includes('testpagina')) { |
||
− | var intervalX = setInterval(TS, 10000); |
+ | var intervalX = setInterval(TS, 10000); |
+ | } |
Versie van 10 jun 2023 22:39
// Test voor het maken van tijd statistieken
var titelnummerTS = 0;
function TS () {
if (document.visibilityState === 'visible') {
titelnummerTS += 1;
} else {
document.title = 'NZ' + titelnummerTS;
}
document.title = titelnummerTS;
}
if (mw.config.get('wgTitle').toLowerCase().includes('testpagina')) {
var intervalX = setInterval(TS, 10000);
}