X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tpl%2Fdefault%2Fjs%2Fshaarli.js;fp=tpl%2Fdefault%2Fjs%2Fshaarli.js;h=edcf280944a6f723551bf5df011f9228f71588f5;hb=0040058da671bdb103dbd4c402290f5f8f51080b;hp=30d8ed6ff73482f9502e03268e321c3643aa0726;hpb=b320c860f5c794c57c08ee2a65c9b73768aac23c;p=github%2Fshaarli%2FShaarli.git diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index 30d8ed6f..edcf2809 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js @@ -255,10 +255,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; }