]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tpl/default/js/shaarli.js
Merge pull request #830 from ArthurHoaro/theme/timezone
[github/shaarli/Shaarli.git] / tpl / default / js / shaarli.js
index 714420b7a73c5e53fc750ac138edb11abd9a106d..4d47fcd0c2cd4aaf3be8080e84c61782adabd247 100644 (file)
@@ -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;
         }