mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-09-19 23:01:08 +02:00
Fix Business-standard.com
This commit is contained in:
parent
4e672ecef4
commit
af6e944887
2 changed files with 8 additions and 4 deletions
|
@ -5,8 +5,9 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal
|
|||
Post-release
|
||||
Add OVB Media (opt-in to custom sites for unlisted)
|
||||
Add Private Media AU
|
||||
Fix Business Insider (js)
|
||||
Fix BizJournals (css)
|
||||
Fix Business Insider (js)
|
||||
Fix Business-standard.com
|
||||
Fix The Economist (regwall)
|
||||
Fix WaPo (js)
|
||||
Update custom sites (block_regex_ignore_default)
|
||||
|
|
|
@ -3963,14 +3963,17 @@ else if (matchDomain('business-standard.com')) {
|
|||
let json = JSON.parse(json_script.text);
|
||||
if (json && json.props.pageProps.data.htmlContent) {
|
||||
let json_text = json.props.pageProps.data.htmlContent;
|
||||
let content = document.querySelector('div.storycontent');
|
||||
let content = document.querySelector('div[class^="MainStory_storycontent__"');
|
||||
if (json_text && content) {
|
||||
content.innerHTML = '';
|
||||
let intro = content.querySelectorAll('div:not([class]');
|
||||
removeDOMElement(...intro);
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(json_text) + '</div>', 'text/html');
|
||||
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(json_text, dompurify_options) + '</div>', 'text/html');
|
||||
let content_new = doc.querySelector('div');
|
||||
content.firstChild.before(content_new);
|
||||
window.setTimeout(function () {
|
||||
content.appendChild(content_new);
|
||||
}, 1000);
|
||||
}
|
||||
} else
|
||||
refreshCurrentTab();
|
||||
|
|
Loading…
Reference in a new issue