mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 05:27:48 +01:00
Fix-update Stratfor (style; not menu)
This commit is contained in:
parent
0c8d7cd3a3
commit
9fdf1bb75c
3 changed files with 21 additions and 5 deletions
|
@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Firefox
|
|||
Post-release
|
||||
Add Diario de Ibiza/Mallorca, Faro de Vigo & La Provincia (Spain)
|
||||
Add Le Un (France)
|
||||
Fix-update Stratfor (style; not menu)
|
||||
|
||||
* v2.0.6.0 (2021-01-31)
|
||||
Add Griffith Review (Australia)
|
||||
|
|
|
@ -2009,12 +2009,27 @@ else if (matchDomain('elmercurio.com')) {
|
|||
}, 1000); // Delay (in milliseconds)
|
||||
}
|
||||
|
||||
else if (matchDomain('stratfor.com')) {
|
||||
else if (matchDomain('stratfor.com') && window.location.href.match(/((\w)+(\-)+){3,}/)) {
|
||||
let banner = document.querySelector('.free-cta-container');
|
||||
removeDOMElement(banner);
|
||||
let css_link = document.querySelector('link[rel="stylesheet"]:not([href="/assets/worldview.d6b47e5305e05acb0c45.css"])');
|
||||
if (css_link)
|
||||
css_link.href = '/assets/worldview.d6b47e5305e05acb0c45.css';
|
||||
let css_link = document.querySelector('link[rel="stylesheet"]');
|
||||
if (css_link && !css_link.getAttribute('style')) {
|
||||
css_link.setAttribute('style', 'done');
|
||||
url = 'https://' + new URL(window.location.href).hostname;
|
||||
fetch(url)
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
response.text().then(html => {
|
||||
var parser = new DOMParser();
|
||||
var doc = parser.parseFromString(html, 'text/html');
|
||||
let css_home = doc.querySelector('link[rel="stylesheet"]');
|
||||
if (css_home) {
|
||||
css_link.href = css_home.href;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
let hidden_images = document.querySelectorAll('img[src^="data:image/gif"][data-src]');
|
||||
for (let hidden_image of hidden_images)
|
||||
hidden_image.setAttribute('src', hidden_image.getAttribute("data-src"));
|
||||
|
|
|
@ -451,5 +451,5 @@
|
|||
"*://*.userzoom.com/*",
|
||||
"*://*.wsj.net/*"
|
||||
],
|
||||
"version": "2.0.6.2"
|
||||
"version": "2.0.6.3"
|
||||
}
|
Loading…
Reference in a new issue