aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/default/js
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-01-14 15:46:39 +0100
committerArthurHoaro <arthur@hoa.ro>2017-01-14 15:46:39 +0100
commite652ba3670a8481eaabb1f8bf721024107abd1e1 (patch)
tree2368c916ec6316aa68c5a7aea9244fc971ce634e /tpl/default/js
parentc03fd3f2bf90448b05405e5c08ba880c532f52ee (diff)
downloadShaarli-e652ba3670a8481eaabb1f8bf721024107abd1e1.tar.gz
Shaarli-e652ba3670a8481eaabb1f8bf721024107abd1e1.tar.zst
Shaarli-e652ba3670a8481eaabb1f8bf721024107abd1e1.zip
Keep up with master changeswebdesign
Diffstat (limited to 'tpl/default/js')
-rw-r--r--tpl/default/js/shaarli.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js
index 2e533af6..d8464aa4 100644
--- a/tpl/default/js/shaarli.js
+++ b/tpl/default/js/shaarli.js
@@ -216,11 +216,13 @@ window.onload = function () {
216 /** 216 /**
217 * Remove CSS target padding (for fixed bar) 217 * Remove CSS target padding (for fixed bar)
218 */ 218 */
219 var anchor = document.querySelector(location.hash); 219 if (location.hash != '') {
220 if (anchor != null) { 220 var anchor = document.querySelector(location.hash);
221 var padsize = anchor.clientHeight; 221 if (anchor != null) {
222 console.log(document.querySelector(location.hash).clientHeight); 222 var padsize = anchor.clientHeight;
223 this.window.scroll(0, this.window.scrollY - padsize); 223 console.log(document.querySelector(location.hash).clientHeight);
224 anchor.style.paddingTop = 0; 224 this.window.scroll(0, this.window.scrollY - padsize);
225 anchor.style.paddingTop = 0;
226 }
225 } 227 }
226}; 228};