Skip to content

Commit

Permalink
Now the plugin installation window does not open if the extension is …
Browse files Browse the repository at this point in the history
…disabled
  • Loading branch information
modos189 committed Dec 28, 2022
1 parent 21603de commit 449c894
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/background/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ async function bypass(tabId, url) {
* @return {Promise<void>}
*/
async function maybeInstallUserJs(tabId, url) {
const IITC_is_enabled = await browser.storage.local
.get(["IITC_is_enabled"])
.then(data => data.IITC_is_enabled);
if (IITC_is_enabled === false) {
await bypass(tabId, url);
return;
}

let code = undefined;
try {
code = await ajaxGet(url);
Expand Down

0 comments on commit 449c894

Please sign in to comment.