From c146f6940a176142084b4fc3c610d13aca60d90e Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 28 Sep 2016 10:30:18 +0200 Subject: Assets work * ES6 all the things ! * ESLint checks everything * CSS fixes (use stylelint) * Fix #2231 --- .../static/themes/_global/js/restoreScroll.js | 25 ---------------------- 1 file changed, 25 deletions(-) delete mode 100644 app/Resources/static/themes/_global/js/restoreScroll.js (limited to 'app/Resources/static/themes/_global/js/restoreScroll.js') diff --git a/app/Resources/static/themes/_global/js/restoreScroll.js b/app/Resources/static/themes/_global/js/restoreScroll.js deleted file mode 100644 index 9c4d7e20..00000000 --- a/app/Resources/static/themes/_global/js/restoreScroll.js +++ /dev/null @@ -1,25 +0,0 @@ -function supportsLocalStorage() { - 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; -} - -function retrievePercent(id) { - if (!supportsLocalStorage()) { return false; } - - var bheight = $(document).height(); - var percent = localStorage['wallabag.article.' + id + '.percent']; - var scroll = bheight * percent; - - $('html,body').animate({ scrollTop: scroll }, 'fast'); - - return true; -} -- cgit v1.2.3