mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 04:01:58 +01:00
Fix bug in NY Times (hidden iframe-content)
This commit is contained in:
parent
487b8cdd9a
commit
81d46fc21e
3 changed files with 21 additions and 2 deletions
|
@ -500,6 +500,25 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(
|
|||
},
|
||||
["blocking", "requestHeaders"]);
|
||||
|
||||
// fix nytimes x-frame-options (hidden iframe content)
|
||||
ext_api.webRequest.onHeadersReceived.addListener(function (details) {
|
||||
if (!isSiteEnabled(details)) {
|
||||
return;
|
||||
}
|
||||
var responseHeaders = details.responseHeaders;
|
||||
responseHeaders = responseHeaders.map(function (responseHeader) {
|
||||
if (responseHeader.name === 'x-frame-options')
|
||||
responseHeader.value = 'SAMEORIGIN';
|
||||
return responseHeader;
|
||||
});
|
||||
return {
|
||||
responseHeaders: responseHeaders
|
||||
};
|
||||
}, {
|
||||
urls: ["*://*.nytimes.com/*"]
|
||||
},
|
||||
['blocking', 'responseHeaders']);
|
||||
|
||||
var block_js_default = ["*://cdn.tinypass.com/*", "*://*.piano.io/*", "*://*.poool.fr/*", "*://cdn.ampproject.org/v*/amp-access-*.js", "*://*.blueconic.net/*", "*://*.cxense.com/*", "*://*.evolok.net/*", "*://js.matheranalytics.com/*", "*://*.onecount.net/*", "*://*.qiota.com/*", "*://*.tribdss.com/*"];
|
||||
var block_js_custom = [];
|
||||
var block_js_custom_ext = [];
|
||||
|
@ -618,7 +637,6 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
|||
if (requestHeader.name === 'User-Agent') {
|
||||
useUserAgentMobile = requestHeader.value.toLowerCase().includes("mobile");
|
||||
}
|
||||
|
||||
return requestHeader;
|
||||
});
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ Add Il Resto del Carlino (Italy)
|
|||
Add The Logic (Canada)
|
||||
Add The New York Review of Books
|
||||
Fix-update Funke Medien (TinyPass)
|
||||
Fix bug in NY Times (hidden iframe-content)
|
||||
|
||||
* v1.9.1.1 (2020-10-19)
|
||||
Hotfix remove cookies (www)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</div>
|
||||
<div id="custom-prompt">
|
||||
<p><strong>custom sites opt-in</strong></p>
|
||||
<p>If you want to enable custom sites and also the option to remove cookies for 'non-listed' sites:</br>
|
||||
<p>If you want to enable custom sites and also have the option to remove cookies/block general paywall-scripts of 'non-listed' sites:</br>
|
||||
<p>custom sites enabled: <span id="custom-enabled"></span></p>
|
||||
<div id="custom-container">
|
||||
<button id="custom-enable">Enable</button>
|
||||
|
|
Loading…
Reference in a new issue