MediaWiki:MoveArticleStates.js

Z Wikipodróży

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 moveArticleStates() { 
    var spacing = 10, coordPadding = 0, tagCoord, tagDoM;

    if (document.getElementById) { 
        tagCoord = document.getElementById("geoCoord"); 
        tagDoM = document.getElementById("DoM"); 
        if (tagDoM != null) { 
            coordPadding = ( /* tagDoM.getElementsByTagName("img").length */ + 2) * 28 + spacing;
            /* The styles of template:Title-icon and template:Title-icons must be rewritten to count the images */
            tagDoM.style.zIndex = 2; 
        } 
        if (tagCoord != null)  tagCoord.style.paddingRight = coordPadding + 'px'; 
    } 
}

$(moveArticleStates);