watch.js: fix on firefox: we used a reserved word

This commit is contained in:
czaks 2013-12-29 02:07:38 +01:00
parent e880c8b542
commit 095378a98f

View File

@ -1,4 +1,7 @@
$(function(){ $(function(){
// migrate from old name
if (typeof localStorage.watch == "string") { localStorage.watch_js = localStorage.watch; }
var status = {}; var status = {};
time_loaded = Date.now(); time_loaded = Date.now();
@ -6,11 +9,11 @@ $(function(){
var updating_suspended = false; var updating_suspended = false;
var storage = function() { var storage = function() {
return JSON.parse(localStorage.watch !== undefined ? localStorage.watch : "{}"); return JSON.parse(localStorage.watch_js !== undefined ? localStorage.watch_js : "{}");
}; };
var storage_save = function(s) { var storage_save = function(s) {
localStorage.watch = JSON.stringify(s); localStorage.watch_js = JSON.stringify(s);
}; };
var osize = function(o) { var osize = function(o) {