From e2a6ccef60778bda7c4b494524d1c346458c2cbd Mon Sep 17 00:00:00 2001 From: ccd0 Date: Thu, 12 Feb 2015 09:46:46 -0800 Subject: [PATCH] Work around GM_listValues issue in Firefox 35+. --- src/General/lib/$.coffee | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/General/lib/$.coffee b/src/General/lib/$.coffee index a243439dd..880258123 100755 --- a/src/General/lib/$.coffee +++ b/src/General/lib/$.coffee @@ -495,7 +495,18 @@ $.set = do -> set key, val return $.clear = (cb) -> - $.delete GM_listValues().map (key) -> key.replace g.NAMESPACE, '' + try + $.delete GM_listValues().map (key) -> key.replace g.NAMESPACE, '' + catch err + # XXX https://github.com/greasemonkey/greasemonkey/issues/2033 + $.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']) + boards = (a.textContent for a in $$ '#boardNavDesktop > .boardList > a') + boards.push 'qa' + $.delete ("cooldown.#{board}" for board in boards) + for board in boards + $.delete ["#{board}.boardTitle", "#{board}.boardSubtitle", "#{board}.boardTitle.orig", "#{board}.boardSubtitle.orig"] cb?() <% } %>