1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

symfony is there

This commit is contained in:
Nicolas Lœuillet 2015-01-22 08:30:07 +01:00
parent 0440249631
commit 93fd4692f6
291 changed files with 11356 additions and 1696 deletions

View file

@ -0,0 +1,25 @@
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;
}