-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude URLs that already overlap with defaults #12
Comments
I think this can be solved by adding preexisting origins (of each content_script) in the webext-dynamic-content-scripts/index.ts Lines 23 to 29 in 251bf0c
Would become: const registeredScript = chrome.contentScripts.register({
js: (config.js || []).map(convertPath),
css: (config.css || []).map(convertPath),
allFrames: config.all_frames,
matches: [origin],
+ exclude_matches: config.matches,
runAt: config.run_at as browser.extensionTypes.RunAt
}); |
Additionally this should ignore whole scripts that are already enabled on The implementation is different since If every script is enabled everywhere, it could use |
This shouldn't happen with https://github.com/fregante/webext-domain-permission-toggle (untested) but it can happen if the user manually adds permissions.
If
manifest.json
includes:And then the extension calls
browser.permissions.request('*://*/*')
, neither the browser norwebext-dynamic-content-scripts
will deduplicate this with existing permissions, so the scripts will be inserted twice.The text was updated successfully, but these errors were encountered: