MediaWiki:Common.js: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
Przykuta (dyskusja | edycje)
ehh
Przykuta (dyskusja | edycje)
jak popsowuję - to krzyczcie i bijcie
Linia 624:
* End of table sorting code
*/
 
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].innerHTML = li[j].innerHTML.replace(/^(\d\d\s\S*)\s\d{4}:/, "$1:");
}
}
}
addOnloadHook(stripDPLYear);