From 79e051a1f216704752e05f5174633abf20dde582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 20 Jan 2015 14:11:26 +0100 Subject: restructure folders --- themes/_global/js/restoreScroll.js | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 themes/_global/js/restoreScroll.js (limited to 'themes/_global/js/restoreScroll.js') diff --git a/themes/_global/js/restoreScroll.js b/themes/_global/js/restoreScroll.js deleted file mode 100644 index 331c9e19..00000000 --- a/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["poche.article." + id + ".percent"] = percent; - return true; -} - -function retrievePercent(id) { - if (!supportsLocalStorage()) { return false; } - - var bheight = $(document).height(); - var percent = localStorage["poche.article." + id + ".percent"]; - var scroll = bheight * percent; - - $('html,body').animate({scrollTop: scroll}, 'fast'); - - return true; -} \ No newline at end of file -- cgit v1.2.3