From 1e277ed2ac3405fd23d1ce2928652d3ecff139ee Mon Sep 17 00:00:00 2001 From: name Date: Mon, 4 Jun 2018 22:13:16 -0700 Subject: [PATCH] Revert workaround for #1323 (7b8c2df5e4aae96b47771c0bb90989765d719d5c) which may be contributing for data corruption issues. #1910 --- src/platform/$.coffee | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/src/platform/$.coffee b/src/platform/$.coffee index 201a4d479..6d35f561c 100644 --- a/src/platform/$.coffee +++ b/src/platform/$.coffee @@ -552,25 +552,11 @@ if GM?.deleteValue? and window.BroadcastChannel and not GM_addValueChangeListene else - # workaround for Firefox 53 issue - $.currentValue = {} - $.GM_getValue = (key) -> - try - $.currentValue[key] = GM_getValue key - catch err - $.currentValue[key] - $.GM_setValue = (key, val) -> - $.currentValue[key] = val - GM_setValue key, val - $.GM_deleteValue = (key) -> - delete $.currentValue[key] - GM_deleteValue key - unless GM_deleteValue? $.perProtocolSettings = true if GM_deleteValue? - $.getValue = $.GM_getValue + $.getValue = GM_getValue $.listValues = -> GM_listValues() # error when called if missing else if $.hasStorage $.getValue = (key) -> localStorage[key] @@ -581,17 +567,17 @@ else $.listValues = -> [] if GM_addValueChangeListener? - $.setValue = $.GM_setValue - $.deleteValue = $.GM_deleteValue + $.setValue = GM_setValue + $.deleteValue = GM_deleteValue else if GM_deleteValue? $.oldValue = {} $.setValue = (key, val) -> - $.GM_setValue key, val + GM_setValue key, val if key of $.syncing $.oldValue[key] = val localStorage[key] = val if $.hasStorage # for `storage` events $.deleteValue = (key) -> - $.GM_deleteValue key + GM_deleteValue key if key of $.syncing delete $.oldValue[key] localStorage.removeItem key if $.hasStorage # for `storage` events