Skip to content

Commit a4e82a5

Browse files
committed
[nscl] MV3 work-around for Permissions-Policy breaking SyncMessage.
1 parent edbebab commit a4e82a5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/content/staticNS.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ const FILE_OR_FTP = /^(?:file|ftp):$/.test(location.protocol);
125125
policy = browser.runtime.sendSyncMessage(msg) || this.domPolicy;
126126
} catch (e) {
127127
error(e);
128+
if (/sync-xhr is not allowed/.test(e.message)) {
129+
attempts = 0;
130+
}
128131
}
129132
if (policy) {
130133
setup(policy);

src/nscl

0 commit comments

Comments
 (0)