X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tpl%2Fdefault%2Fjs%2Fshaarli.js;h=4d47fcd0c2cd4aaf3be8080e84c61782adabd247;hb=4c7045229c94973c1cb83193e69463f426ddc35b;hp=714420b7a73c5e53fc750ac138edb11abd9a106d;hpb=49bc541d7973bd86776441eb072e66d01b368e68;p=github%2Fshaarli%2FShaarli.git diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index 714420b7..4d47fcd0 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js @@ -258,10 +258,9 @@ window.onload = function () { * Remove CSS target padding (for fixed bar) */ if (location.hash != '') { - var anchor = document.querySelector(location.hash); + var anchor = document.getElementById(location.hash.substr(1)); if (anchor != null) { var padsize = anchor.clientHeight; - console.log(document.querySelector(location.hash).clientHeight); this.window.scroll(0, this.window.scrollY - padsize); anchor.style.paddingTop = 0; }