mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix content scripts matches
This commit is contained in:
@@ -26,9 +26,7 @@ const runContentScript = function (extensionId, url, code) {
|
||||
// Run injected scripts.
|
||||
// https://developer.chrome.com/extensions/content_scripts
|
||||
const injectContentScript = function (extensionId, script) {
|
||||
for (const match of script.matches) {
|
||||
if (!matchesPattern(match)) return
|
||||
}
|
||||
if (!script.matches.some(matchesPattern)) return
|
||||
|
||||
for (const {url, code} of script.js) {
|
||||
const fire = runContentScript.bind(window, extensionId, url, code)
|
||||
|
||||
Reference in New Issue
Block a user