Jump to content

User:PaterMcFly/Gadget-Pfeil-hoch.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* von: http://fr.wikipedia.org/wiki/MediaWiki:Gadget-FlecheHaut.js */

function PageHomeArrows()
{
        for (var level = 2; level <= 6; ++level) {
                var h = document.getElementsByTagName("h" + level);
                for (var i = 0; i < h.length; ++i) {
                        var arrow = document.createElement("a");
                        arrow.className = "noprint";
                        arrow.appendChild(document.createTextNode(" ↑"));
                        arrow.href = "javascript:window.scrollTo(0,0); void 0;";
                        h[i].appendChild(arrow);
                }
        }
}
$(PageHomeArrows);