Fix-update Tech in Asia (premium)
parent
b635aa0132
commit
bb0962234d
|
@ -6,6 +6,7 @@ Add GenomeWeb, 360Dx & Precision Oncology News
|
|||
Add Levante-EMV (Spain)
|
||||
Add L'Oeil de la Photographie (fr/en)
|
||||
Add The New Atlantis
|
||||
Fix-update Tech in Asia (premium)
|
||||
Update custom sites (optional: only permissions for added sites)
|
||||
Update badge (notification: update & custom permissions)
|
||||
|
||||
|
|
|
@ -2149,8 +2149,26 @@ else if (matchDomain('stratfor.com')) {
|
|||
|
||||
else if (matchDomain('techinasia.com')) {
|
||||
let paywall = document.querySelector('.paywall-content');
|
||||
if (paywall)
|
||||
if (paywall) {
|
||||
paywall.classList.remove('paywall-content');
|
||||
let url = window.location.href;
|
||||
let url_xhr = url.replace('.com/', '.com/wp-json/techinasia/2.0/posts/');
|
||||
fetch(url_xhr)
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
response.json().then(json => {
|
||||
let json_text = json.posts[0].content;
|
||||
let content = document.querySelector('div.content');
|
||||
if (json_text && content) {
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div class="jsx-1794864983 content">' + json_text + '</div>', 'text/html');
|
||||
let content_new = doc.querySelector('div.content');
|
||||
content.parentNode.replaceChild(content_new, content);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
let splash_subscribe = document.querySelector('.splash-subscribe');
|
||||
let paywall_hard = document.querySelector('.paywall-hard');
|
||||
removeDOMElement(splash_subscribe, paywall_hard);
|
||||
|
|
|
@ -30,5 +30,5 @@
|
|||
"webRequestBlocking",
|
||||
"<all_urls>"
|
||||
],
|
||||
"version": "2.1.8.6"
|
||||
"version": "2.1.8.7"
|
||||
}
|
|
@ -496,5 +496,5 @@
|
|||
"*://*.wallkit.net/*",
|
||||
"*://*.wsj.net/*"
|
||||
],
|
||||
"version": "2.1.8.6"
|
||||
"version": "2.1.8.7"
|
||||
}
|
Loading…
Reference in New Issue