mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 05:37:47 +01:00
Fix iPolitics.ca (refresh)
This commit is contained in:
parent
f35f017dee
commit
db9229c76c
4 changed files with 24 additions and 15 deletions
|
@ -4,7 +4,8 @@ Updates: https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/release
|
|||
|
||||
Post-release
|
||||
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)
|
||||
Add Medienhaus Aachen
|
||||
|
|
|
@ -3457,19 +3457,27 @@ else if (matchDomain('ipolitics.ca')) {
|
|||
removeDOMElement(login);
|
||||
let json_script = document.querySelector('script#__NEXT_DATA__');
|
||||
if (json_script) {
|
||||
try {
|
||||
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 = document.querySelector('.post-header');
|
||||
let article = document.querySelector('.post-body');
|
||||
if (article) {
|
||||
article.innerHTML = '';
|
||||
article.classList.remove('locked');
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div>' + article_new + '</div>', 'text/html');
|
||||
let content_new = doc.querySelector('div');
|
||||
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",
|
||||
"*://*/*"
|
||||
],
|
||||
"version": "3.0.9.1"
|
||||
"version": "3.0.9.2"
|
||||
}
|
||||
|
|
|
@ -736,5 +736,5 @@
|
|||
"*://*.wallkit.net/*",
|
||||
"*://webcache.googleusercontent.com/*"
|
||||
],
|
||||
"version": "3.0.9.1"
|
||||
"version": "3.0.9.2"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue