diff options
author | ManeraKai <manerakai@protonmail.com> | 2023-05-12 08:48:16 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2023-05-12 08:48:16 +0300 |
commit | 03d0b41a7fff3ee339944570d982db62312b9447 (patch) | |
tree | c5d1170d883068078d1de547ad0d235f2cd7cfa7 /src/assets/javascripts/general.js | |
parent | Updated README (diff) | |
download | libredirect-03d0b41a7fff3ee339944570d982db62312b9447.zip |
ignored http from url exclusions https://github.com/libredirect/browser_extension/issues/665. Cleaned other things
Diffstat (limited to 'src/assets/javascripts/general.js')
-rw-r--r-- | src/assets/javascripts/general.js | 30 |
1 files changed, 0 insertions, 30 deletions
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, -} |