Skip to content

Commit

Permalink
Fix behavior in Chrome MV3 where plugins remain active after being di…
Browse files Browse the repository at this point in the history
…sabled
  • Loading branch information
modos189 committed Sep 18, 2024
1 parent 958454a commit bd7c656
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"core-js": "^3.8.3",
"highlight.js": "^10.7.3",
"jszip": "^3.10.1",
"lib-iitc-manager": "^1.9.0",
"lib-iitc-manager": "^1.9.1",
"scored-fuzzysearch": "^1.0.5",
"vue": "^2.6.14"
},
Expand Down
1 change: 1 addition & 0 deletions src/background/injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export async function manage_userscripts_api(plugins_event) {
const remove_ids = Object.keys(plugins);
try {
await browser.userScripts.unregister({ ids: remove_ids });
return;
} catch (e) {
console.log("an error occurred while unregistering the plugin", e);

Check warning on line 63 in src/background/injector.js

View workflow job for this annotation

GitHub Actions / build (build_mv2)

Unexpected console statement

Check warning on line 63 in src/background/injector.js

View workflow job for this annotation

GitHub Actions / build (build_mv3_firefox)

Unexpected console statement

Check warning on line 63 in src/background/injector.js

View workflow job for this annotation

GitHub Actions / build (build_mv3_chrome)

Unexpected console statement

Check warning on line 63 in src/background/injector.js

View workflow job for this annotation

GitHub Actions / build (build_mv3_safari)

Unexpected console statement
}
Expand Down

0 comments on commit bd7c656

Please sign in to comment.