From 0743287f955fd19fd1a04c91f3b40a4ac2236423 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 9 Jun 2016 19:02:38 +0200 Subject: clean & lint stuff --- .../static/themes/_global/js/restoreScroll.js | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'app/Resources/static/themes/_global/js') diff --git a/app/Resources/static/themes/_global/js/restoreScroll.js b/app/Resources/static/themes/_global/js/restoreScroll.js index e63d06c6..9c4d7e20 100644 --- a/app/Resources/static/themes/_global/js/restoreScroll.js +++ b/app/Resources/static/themes/_global/js/restoreScroll.js @@ -1,25 +1,25 @@ function supportsLocalStorage() { - try { - return 'localStorage' in window && window['localStorage'] !== null; - } catch (e) { - return false; - } + try { + return 'localStorage' in window && window.localStorage !== null; + } catch (e) { + return false; + } } function savePercent(id, percent) { - if (!supportsLocalStorage()) { return false; } - localStorage["wallabag.article." + id + ".percent"] = percent; - return true; + if (!supportsLocalStorage()) { return false; } + localStorage['wallabag.article.' + id + '.percent'] = percent; + return true; } function retrievePercent(id) { - if (!supportsLocalStorage()) { return false; } + if (!supportsLocalStorage()) { return false; } - var bheight = $(document).height(); - var percent = localStorage["wallabag.article." + id + ".percent"]; - var scroll = bheight * percent; + var bheight = $(document).height(); + var percent = localStorage['wallabag.article.' + id + '.percent']; + var scroll = bheight * percent; - $('html,body').animate({scrollTop: scroll}, 'fast'); + $('html,body').animate({ scrollTop: scroll }, 'fast'); - return true; + return true; } -- cgit v1.2.3