From 56b737b65a61c38c4904a931de311d0fc8c7fd73 Mon Sep 17 00:00:00 2001 From: eight Date: Thu, 4 Oct 2018 18:14:57 +0800 Subject: [PATCH] Remove unused FIREFOX_NO_DOM_STORAGE --- background/util.js | 5 ----- js/messaging.js | 7 ------- js/prefs.js | 1 - 3 files changed, 13 deletions(-) delete mode 100644 background/util.js diff --git a/background/util.js b/background/util.js deleted file mode 100644 index 7b85af96..00000000 --- a/background/util.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -if (typeof localStorage === 'object' && localStorage) { - localStorage._BG_ACCESS = 1; -} diff --git a/js/messaging.js b/js/messaging.js index b4b432de..eab3bc7f 100644 --- a/js/messaging.js +++ b/js/messaging.js @@ -97,13 +97,6 @@ if (!BG || BG !== window) { BG.API_METHODS = {}; } -const FIREFOX_NO_DOM_STORAGE = FIREFOX && !tryCatch(() => localStorage && localStorage._BG_ACCESS); -if (FIREFOX_NO_DOM_STORAGE) { - // may be disabled via dom.storage.enabled - Object.defineProperty(window, 'localStorage', {value: {}}); - Object.defineProperty(window, 'sessionStorage', {value: {}}); -} - // eslint-disable-next-line no-var var API = (() => { return new Proxy(() => {}, { diff --git a/js/prefs.js b/js/prefs.js index 262eabf8..e3894b23 100644 --- a/js/prefs.js +++ b/js/prefs.js @@ -1,4 +1,3 @@ -/* global prefs: true, contextMenus, FIREFOX_NO_DOM_STORAGE */ 'use strict'; // eslint-disable-next-line no-var