From d6902eea60acea9f1ea3828e1cdb0bf6288e7b06 Mon Sep 17 00:00:00 2001 From: hackademix Date: Tue, 14 Aug 2018 00:58:14 +0200 Subject: Removed browser->webex "shim". --- html/preferences_panel/pref.js | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'html') diff --git a/html/preferences_panel/pref.js b/html/preferences_panel/pref.js index 757bf5e..4642d32 100644 --- a/html/preferences_panel/pref.js +++ b/html/preferences_panel/pref.js @@ -19,25 +19,7 @@ * along with GNU LibreJS. If not, see . */ -/** -* -* Sets global variable "webex" to either "chrome" or "browser" for -* use on Chrome or a Firefox variant. -* -* Change this to support a new browser that isn't Chrome or Firefox, -* given that it supports webExtensions. -* -* (Use the variable "webex" for all API calls after calling this) -*/ var store; -function set_webex(){ - if(typeof(browser) == "undefined"){ - webex = chrome; - } else{ - webex = browser; - } -} -set_webex(); function storage_got(items){ var inputs = document.getElementsByTagName("input"); @@ -67,7 +49,7 @@ function storage_got(items){ } -webex.storage.local.get(storage_got); +browser.storage.local.get(storage_got); document.getElementById("save_changes").addEventListener("click", function(){ var inputs = document.getElementsByTagName("input"); @@ -91,7 +73,5 @@ document.getElementById("save_changes").addEventListener("click", function(){ } console.log(data); - webex.storage.local.set(data); + browser.storage.local.set(data); }); - - -- cgit v1.2.3