MediaWiki:Gadget-Hitcounter-text.js: Skillnad mellan sidversioner
(Skapade sidan med 'console.log('hitcounter-text');') |
mIngen redigeringssammanfattning |
||
(6 mellanliggande sidversioner av en annan användare visas inte) | |||
Rad 1: | Rad 1: | ||
console.log('hitcounter-text'); | console.log('hitcounter-text'); | ||
var text = $('#footer-info-viewcount').text(); | |||
if ($('html').attr('lang') == 'sv') { | |||
$('#footer-info-viewcount').text(text.replace(/\.$/, ' sedan 2020-09-25.')); | |||
} else { | |||
$('#footer-info-viewcount').text(text.replace(/\.$/, ' since 2020-09-25.')); | |||
} | |||
if (wgPageName === "Special:PopularPages") { | |||
var text = $('#firstHeading').text(); | |||
if ($('html').attr('lang') == 'sv') { | |||
$('#firstHeading').text('Populära sidor sedan 2020-09-25'); | |||
} else { | |||
$('#firstHeading').text('Popular pages since 2020-09-25'); | |||
} | |||
} |
Nuvarande version från 13 november 2020 kl. 14.00
console.log('hitcounter-text'); var text = $('#footer-info-viewcount').text(); if ($('html').attr('lang') == 'sv') { $('#footer-info-viewcount').text(text.replace(/\.$/, ' sedan 2020-09-25.')); } else { $('#footer-info-viewcount').text(text.replace(/\.$/, ' since 2020-09-25.')); } if (wgPageName === "Special:PopularPages") { var text = $('#firstHeading').text(); if ($('html').attr('lang') == 'sv') { $('#firstHeading').text('Populära sidor sedan 2020-09-25'); } else { $('#firstHeading').text('Popular pages since 2020-09-25'); } }