From 5f8ac8b8f6436c3b18a95c33b02b89485bbc9081 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 23 Jun 2015 15:42:06 -0700 Subject: [PATCH] Allow case where GM_listValues is not defined. --- src/General/lib/$.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/General/lib/$.coffee b/src/General/lib/$.coffee index e6b6ef305..94b8bc6be 100755 --- a/src/General/lib/$.coffee +++ b/src/General/lib/$.coffee @@ -430,7 +430,7 @@ if GM_getValue? if key of $.syncing delete $.oldValue[key] delete localStorage[key] # for `storage` events - $.listValues = GM_listValues + $.listValues = -> GM_listValues() # error when called if missing else $.getValue = (key) -> localStorage[key] $.setValue = (key, val) -> @@ -496,6 +496,7 @@ $.set = (keys, val, cb) -> $.clear = (cb) -> # XXX https://github.com/greasemonkey/greasemonkey/issues/2033 + # Also support case where GM_listValues is not defined. $.delete Object.keys(Conf) $.delete ['previousversion', 'AutoWatch', 'cooldown.global', 'QR Size', 'captchas', 'QR.persona', 'hiddenPSA'] $.delete ("#{id}.position" for id in ['embedding', 'updater', 'thread-stats', 'thread-watcher', 'qr'])