X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FResources%2Fviews%2Fthemes%2Fmaterial%2Fpublic%2Fjs%2FrestoreScroll.js;fp=src%2FWallabag%2FCoreBundle%2FResources%2Fviews%2Fthemes%2Fmaterial%2Fpublic%2Fjs%2FrestoreScroll.js;h=0000000000000000000000000000000000000000;hb=30d81a47c689e1d7d963fcd3fd42af9958805e31;hp=331c9e1966f15277de78f475a2522858b39f767d;hpb=124f8091cbb1e5cccd7972fa368f8e7c434e0e5b;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/js/restoreScroll.js b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/js/restoreScroll.js deleted file mode 100644 index 331c9e19..00000000 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/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