mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-16 06:13:16 +00:00
Fix iPolitics.ca (refresh)
This commit is contained in:
parent
f35f017dee
commit
db9229c76c
@ -4,7 +4,8 @@ Updates: https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/release
|
|||||||
|
|
||||||
Post-release
|
Post-release
|
||||||
Remove Iltalehti.fi (fix obsolete)
|
Remove Iltalehti.fi (fix obsolete)
|
||||||
Fix Sciences et Avenir.fr
|
Fix iPolitics.ca (refresh)
|
||||||
|
Fix Sciences et Avenir.fr (css)
|
||||||
|
|
||||||
* v3.0.9.0 (2023-03-12)
|
* v3.0.9.0 (2023-03-12)
|
||||||
Add Medienhaus Aachen
|
Add Medienhaus Aachen
|
||||||
|
@ -3457,19 +3457,27 @@ else if (matchDomain('ipolitics.ca')) {
|
|||||||
removeDOMElement(login);
|
removeDOMElement(login);
|
||||||
let json_script = document.querySelector('script#__NEXT_DATA__');
|
let json_script = document.querySelector('script#__NEXT_DATA__');
|
||||||
if (json_script) {
|
if (json_script) {
|
||||||
|
try {
|
||||||
let json = JSON.parse(json_script.innerText);
|
let json = JSON.parse(json_script.innerText);
|
||||||
if (json && json.props.pageProps.post.content) {
|
if (json && json.props.pageProps.post && json.props.pageProps.post.content) {
|
||||||
|
let url_next = json.props.pageProps.post.slug;
|
||||||
|
if (url_next && !window.location.pathname.includes(url_next))
|
||||||
|
refreshCurrentTab();
|
||||||
let article_new = json.props.pageProps.post.content;
|
let article_new = json.props.pageProps.post.content;
|
||||||
let article = document.querySelector('.post-header');
|
let article = document.querySelector('.post-body');
|
||||||
if (article) {
|
if (article) {
|
||||||
|
article.innerHTML = '';
|
||||||
|
article.classList.remove('locked');
|
||||||
let parser = new DOMParser();
|
let parser = new DOMParser();
|
||||||
let doc = parser.parseFromString('<div>' + article_new + '</div>', 'text/html');
|
let doc = parser.parseFromString('<div>' + article_new + '</div>', 'text/html');
|
||||||
let content_new = doc.querySelector('div');
|
let content_new = doc.querySelector('div');
|
||||||
article.appendChild(content_new);
|
article.appendChild(content_new);
|
||||||
let locked = document.querySelector('div.locked');
|
|
||||||
if (locked)
|
|
||||||
locked.classList.remove('locked');
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
refreshCurrentTab();
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,5 +51,5 @@
|
|||||||
"webRequestBlocking",
|
"webRequestBlocking",
|
||||||
"*://*/*"
|
"*://*/*"
|
||||||
],
|
],
|
||||||
"version": "3.0.9.1"
|
"version": "3.0.9.2"
|
||||||
}
|
}
|
||||||
|
@ -736,5 +736,5 @@
|
|||||||
"*://*.wallkit.net/*",
|
"*://*.wallkit.net/*",
|
||||||
"*://webcache.googleusercontent.com/*"
|
"*://webcache.googleusercontent.com/*"
|
||||||
],
|
],
|
||||||
"version": "3.0.9.1"
|
"version": "3.0.9.2"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user