From 03d0b41a7fff3ee339944570d982db62312b9447 Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Fri, 12 May 2023 08:48:16 +0300 Subject: ignored http from url exclusions https://github.com/libredirect/browser_extension/issues/665. Cleaned other things --- src/assets/javascripts/general.js | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 src/assets/javascripts/general.js (limited to 'src/assets/javascripts/general.js') diff --git a/src/assets/javascripts/general.js b/src/assets/javascripts/general.js deleted file mode 100644 index 588c67d1..00000000 --- a/src/assets/javascripts/general.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict" - -import utils from "./utils.js" - -window.browser = window.browser || window.chrome - -let exceptions - -function isException(url) { - if (exceptions && url) { - if (exceptions.url) for (const item of exceptions.url) if (item == url.href) return true - if (exceptions.regex) for (const item of exceptions.regex) if (new RegExp(item).test(url.href)) return true - } - return false -} - -function init() { - return new Promise(async resolve => { - const options = await utils.getOptions() - if (options) exceptions = options.exceptions - resolve() - }) -} - -init() -browser.storage.onChanged.addListener(init) - -export default { - isException, -} -- cgit 1.4.1