Skip to content

Commit 049c5c0

Browse files
committed
detect CSP violations also in Chrome
1 parent 24f4512 commit 049c5c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/style-injector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function addAllElements() {
9393
if (!__.ENTRY && !checkCSP) {
9494
/** @param {SecurityPolicyViolationEvent} evt */
9595
checkCSP = evt => {
96-
if (evt.isTrusted && evt.sourceFile === 'moz-extension') {
96+
if (evt.isTrusted && /^(\w+-)?extension$/.test(evt.sourceFile)) {
9797
for (const style of list) {
9898
if (style.code.includes(evt.blockedURI)) {
9999
API.tabs.set(null, pPatchCsp, style.id, evt.blockedURI, true);

0 commit comments

Comments
 (0)