- commit
- bf09ba068160be3316fe7a45bf054bc3e18f96a2
- parent
- 31699536289e349e3e4fabf6fbeda4d4012868ae
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2022-08-07 09:06
create placeholder for subframes
Diffstat
| M | src/bg.js | 8 | +++++++- |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bg.js b/src/bg.js
@@ -108,7 +108,13 @@ browser.webRequest.onBeforeRequest.addListener(details => {
108 108
109 109 pushRequest(details.tabId, hostname, type);
110 110
111 -1 return {cancel: !shared.shouldAllow(rules, context, hostname, type)};
-1 111 if (!shared.shouldAllow(rules, context, hostname, type)) {
-1 112 if (details.type === 'sub_frame') {
-1 113 return {redirectUrl: 'data:,' + encodeURIComponent(details.url)};
-1 114 } else {
-1 115 return {cancel: true};
-1 116 }
-1 117 }
112 118 }, {urls: ['<all_urls>']}, ['blocking']);
113 119
114 120 browser.webRequest.onHeadersReceived.addListener(function(details) {