webext-bugs
Advanced tools
| import webextAlert from 'webext-alert'; | ||
| import chromeP from 'webext-polyfill-kinda'; | ||
| const manifest = chrome.runtime.getManifest(); | ||
@@ -7,3 +6,3 @@ const name = manifest.short_name ?? manifest.name; | ||
| chrome.runtime.onInstalled.addListener(async () => { | ||
| if (await chromeP.permissions.contains({ origins: ['*://*/*'] })) { | ||
| if (await chrome.permissions.contains({ origins: ['*://*/*'] })) { | ||
| console.warn(name + ' was granted access to all websites by the user and it’s now been removed. https://github.com/fregante/webext-bugs/blob/main/source/no-all-urls.md'); | ||
@@ -10,0 +9,0 @@ await chrome.permissions.remove({ |
@@ -13,5 +13,5 @@ import { isChrome } from 'webext-detect'; | ||
| title: 'Options', | ||
| contexts: 'action' in chrome ? ['action'] : ['browser_action'], | ||
| contexts: ['action'], | ||
| onclick: async () => chrome.runtime.openOptionsPage(), | ||
| }); | ||
| } |
+1
-2
| { | ||
| "name": "webext-bugs", | ||
| "version": "1.1.2", | ||
| "version": "2.0.0", | ||
| "description": "WebExtension module: Useful fixes and workarounds for browser extension shortcomings", | ||
@@ -38,3 +38,2 @@ "keywords": [ | ||
| "webext-detect": "^5.3.2", | ||
| "webext-polyfill-kinda": "^1.0.2", | ||
| "webext-tools": "^3.0.0" | ||
@@ -41,0 +40,0 @@ }, |
4
-20%6905
-1.78%82
-1.2%- Removed