fix using Date.now()
GM_setValue can only handle 32 bit integers. band-aid until I JSON. parse/stringify everything
This commit is contained in:
parent
520a2f32d1
commit
4a15b1158f
@ -1560,7 +1560,7 @@
|
||||
if ($.isDST()) {
|
||||
g.chanOffset -= 1;
|
||||
}
|
||||
lastChecked = GM_getValue('lastChecked', 0);
|
||||
lastChecked = Number(GM_getValue('lastChecked', '0'));
|
||||
now = Date.now();
|
||||
DAY = 24 * 60 * 60;
|
||||
if (lastChecked < now - 1 * DAY) {
|
||||
@ -1579,7 +1579,7 @@
|
||||
}
|
||||
GM_setValue("hiddenThreads/" + g.BOARD + "/", JSON.stringify(g.hiddenThreads));
|
||||
GM_setValue("hiddenReplies/" + g.BOARD + "/", JSON.stringify(g.hiddenReplies));
|
||||
GM_setValue('lastChecked', now);
|
||||
GM_setValue('lastChecked', now.toString());
|
||||
}
|
||||
GM_addStyle('\
|
||||
#iHover {\
|
||||
|
||||
@ -1200,7 +1200,7 @@ tzOffset = (new Date()).getTimezoneOffset() / 60
|
||||
g.chanOffset = 5 - tzOffset# 4chan = EST = GMT -5
|
||||
if $.isDST() then g.chanOffset -= 1
|
||||
|
||||
lastChecked = GM_getValue('lastChecked', 0)
|
||||
lastChecked = Number GM_getValue('lastChecked', '0')
|
||||
now = Date.now()
|
||||
DAY = 24 * 60 * 60
|
||||
if lastChecked < now - 1*DAY
|
||||
@ -1217,7 +1217,7 @@ if lastChecked < now - 1*DAY
|
||||
|
||||
GM_setValue("hiddenThreads/#{g.BOARD}/", JSON.stringify(g.hiddenThreads))
|
||||
GM_setValue("hiddenReplies/#{g.BOARD}/", JSON.stringify(g.hiddenReplies))
|
||||
GM_setValue('lastChecked', now)
|
||||
GM_setValue('lastChecked', now.toString())
|
||||
|
||||
GM_addStyle '
|
||||
#iHover {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user