mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-05-17 15:57:04 +02:00
This reverts commit 936be59d4314bd27417e2ad856b828dae0b609e2.
This commit is contained in:
parent
c0efe01ce2
commit
0cbe35992f
@ -275,23 +275,6 @@ if (matchDomain('elmercurio.com')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).observe(document, { subtree: true, childList: true });
|
}).observe(document, { subtree: true, childList: true });
|
||||||
// Reload iframes after window is loaded to fix iframes not loading
|
|
||||||
document.addEventListener('readystatechange', event => {
|
|
||||||
if (event.target.readyState === 'complete') {
|
|
||||||
const iframes = document.querySelectorAll('iframe');
|
|
||||||
iframes.forEach(iframe =>
|
|
||||||
window.fetch(iframe.src).then(function (response) {
|
|
||||||
// The API call was successful!
|
|
||||||
return response.text();
|
|
||||||
}).then(function (html) {
|
|
||||||
// This is the HTML from our response as a text string
|
|
||||||
iframe.outerHTML = html;
|
|
||||||
}).catch(function (err) {
|
|
||||||
// There was an error
|
|
||||||
console.warn('Something went wrong.', err);
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (matchDomain('technologyreview.com')) {
|
} else if (matchDomain('technologyreview.com')) {
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
const bodyObscured = document.querySelector('body[class*="body__obscureContent"]');
|
const bodyObscured = document.querySelector('body[class*="body__obscureContent"]');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user