Wikireporter:Bawolff/monobook.js
Uwaga: aby zobaczyć zmiany po opublikowaniu, może zajść potrzeba wyczyszczenia pamięci podręcznej przeglądarki.
- Firefox / Safari: Przytrzymaj Shift podczas klikania Odśwież bieżącą stronę, lub naciśnij klawisze Ctrl+F5, lub Ctrl+R (⌘-R na komputerze Mac)
- Google Chrome: Naciśnij Ctrl-Shift-R (⌘-Shift-R na komputerze Mac)
- Internet Explorer / Edge: Przytrzymaj Ctrl, jednocześnie klikając Odśwież, lub naciśnij klawisze Ctrl+F5
- Opera: Naciśnij klawisze Ctrl+F5.
function stripDPLYear() {
//Removes the year of a DPL enclosed in a div with class noYear and addfirstcategorydate=true leaving only month and date
/*extern getElementsByClassName addOnloadHook */
var bodyContent = document.getElementById("bodyContent");
var noYear = getElementsByClassName(bodyContent, "div", "noYear");
var li;
for (var i = 0; i < noYear.length; i++) {
li = noYear[i].getElementsByTagName("li");
for (var j = 0;j < li.length; j++) {
li[j].firstChild.data = li[j].firstChild.data.replace(/^(\d{1,2}\s\S*)\s\d{4}:/, "$1:");
}
}
}
$(stripDPLYear);