|
|
|
@ -1258,9 +1258,19 @@ else if (matchDomain('ruhrnachrichten.de') || document.querySelector('a.mgw-logo
|
|
|
|
|
let paywall = document.querySelector('body.is_plus_article');
|
|
|
|
|
if (paywall && dompurify_loaded) {
|
|
|
|
|
paywall.classList.remove('is_plus_article');
|
|
|
|
|
let json_url;
|
|
|
|
|
let json_url_dom = document.querySelector('head > link[rel="alternate"][type="application/json"][href]');
|
|
|
|
|
if (json_url_dom) {
|
|
|
|
|
let json_url = json_url_dom.href;
|
|
|
|
|
} else {
|
|
|
|
|
let pathname = window.location.pathname;
|
|
|
|
|
let article_id;
|
|
|
|
|
if (pathname.includes('-p-'))
|
|
|
|
|
article_id = pathname.split('-p-')[1].split('/')[0];
|
|
|
|
|
if (article_id)
|
|
|
|
|
json_url = 'https://' + window.location.hostname + '/wp-json/wp/v2/posts/' + article_id;
|
|
|
|
|
}
|
|
|
|
|
if (json_url) {
|
|
|
|
|
fetch(json_url)
|
|
|
|
|
.then(response => {
|
|
|
|
|
if (response.ok) {
|
|
|
|
|