diff --git a/changelog.txt b/changelog.txt
index cdcf33fd..9cc9161d 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -7,6 +7,7 @@ Fix Inc42 (js)
Fix Puck.news (ld_json_url)
Fix Tes Magazine (css)
Fix The Diplomat (magazine)
+Fix The Wrap (ld_json_url)
Update block general paywall script (fix Ippen.space)
* v3.3.2.0 (2023-09-03)
diff --git a/contentScript.js b/contentScript.js
index 517c3df6..d051cd45 100644
--- a/contentScript.js
+++ b/contentScript.js
@@ -5122,9 +5122,32 @@ else if (matchDomain('theverge.com')) {
}
else if (matchDomain('thewrap.com')) {
- let paywall = document.querySelector('.wrappro-paywall');
- if (paywall)
- paywall.classList.remove('wrappro-paywall');
+ let paywall = document.querySelector('div#zephr-payment-form-root');
+ if (paywall && dompurify_loaded) {
+ removeDOMElement(paywall);
+ let json_url_dom = document.querySelector('link[rel="alternate"][type="application/json"][href]');
+ if (json_url_dom) {
+ let json_url = json_url_dom.href;
+ fetch(json_url)
+ .then(response => {
+ if (response.ok) {
+ response.json().then(json => {
+ let json_text = json.content.rendered;
+ let content = document.querySelector('div.entry-content');
+ if (json_text && content) {
+ let parser = new DOMParser();
+ let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text) + '
', 'text/html');
+ content.innerHTML = '';
+ let content_new = doc.querySelector('div');
+ content.appendChild(content_new, content);
+ }
+ });
+ }
+ });
+ }
+ let fade = document.querySelector('div.content-area div[style*="background-image: linear-gradient"]');
+ removeDOMElement(fade);
+ }
}
else if (matchDomain('timeshighereducation.com')) {
@@ -5648,11 +5671,12 @@ function amp_iframes_replace(weblink = false, source = '') {
elem = document.createElement('iframe');
Object.assign(elem, {
src: amp_iframe.getAttribute('src'),
- sandbox: amp_iframe.getAttribute('sandbox'),
height: amp_iframe.getAttribute('height'),
width: 'auto',
style: 'border: 0px;'
});
+ if (amp_iframe.getAttribute('sandbox'))
+ elem.sandbox = amp_iframe.getAttribute('sandbox');
amp_iframe.parentNode.replaceChild(elem, amp_iframe);
} else {
par = document.createElement('p');
diff --git a/custom/manifest.json b/custom/manifest.json
index f7e81a45..ee5c6d52 100644
--- a/custom/manifest.json
+++ b/custom/manifest.json
@@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
- "version": "3.3.2.4"
+ "version": "3.3.2.5"
}
diff --git a/custom/sites_custom.json b/custom/sites_custom.json
index 51648983..05c17d71 100644
--- a/custom/sites_custom.json
+++ b/custom/sites_custom.json
@@ -73,6 +73,12 @@
"domain": "businessnews.com.au",
"useragent": "googlebot"
},
+ "Cambiocolombia.com": {
+ "allow_cookies": 1,
+ "amp_redirect": "div#require-access",
+ "amp_unhide": 1,
+ "domain": "cambiocolombia.com"
+ },
"Capital.bg": {
"allow_cookies": 1,
"domain": "capital.bg",
@@ -113,6 +119,11 @@
"block_regex": "\\.tinypass\\.com",
"domain": "dailyherald.com"
},
+ "Dealstreetasia.com": {
+ "allow_cookies": 1,
+ "domain": "dealstreetasia.com",
+ "ld_json_next": "div.subscribe-now|article"
+ },
"Diabeteshealth.co.in": {
"allow_cookies": 1,
"domain": "diabeteshealth.co.in",
diff --git a/manifest.json b/manifest.json
index ebabc42f..018e0720 100644
--- a/manifest.json
+++ b/manifest.json
@@ -796,5 +796,5 @@
"*://*.wyleex.com/*",
"*://webcache.googleusercontent.com/*"
],
- "version": "3.3.2.4"
+ "version": "3.3.2.5"
}
diff --git a/sites.js b/sites.js
index 6dfe9009..5836d20b 100644
--- a/sites.js
+++ b/sites.js
@@ -2353,8 +2353,8 @@ var defaultSites = {
},
"The Wrap": {
domain: "thewrap.com",
- allow_cookies: 1,
- block_regex: /\.wallkit\.net\/js\//
+ remove_cookies_select_drop: ["blaize_session"],
+ cs_dompurify: 1
},
"Times Higher Education": {
domain: "timeshighereducation.com",
diff --git a/sites_updated.json b/sites_updated.json
index d8e0b836..f856fbb7 100644
--- a/sites_updated.json
+++ b/sites_updated.json
@@ -135,5 +135,11 @@
"allow_cookies": 1,
"cs_code": "[{\"cond\":\"div.paywall\", \"rm_class\":\"paywall\", \"elems\":[{\"cond\":\"div.gated-fader\", \"rm_elem\": 1}, {\"cond\":\"div#Modal\", \"rm_elem\": 1}]}]",
"upd_version": "3.3.1.8"
+ },
+ "The Wrap": {
+ "domain": "thewrap.com",
+ "remove_cookies_select_drop": ["blaize_session"],
+ "ld_json_url": "div#zephr-payment-form-root|div.entry-content|1",
+ "upd_version": "3.3.2.5"
}
}
diff --git a/updates.json b/updates.json
index 9747cfd2..b70b4ba3 100644
--- a/updates.json
+++ b/updates.json
@@ -2,8 +2,8 @@
"addons": {
"magnolia@12.34": {
"updates": [
- { "version": "3.3.1.0",
- "update_link": "https://gitlab.com/magnolia1234/bpc-uploads/-/raw/master/bypass_paywalls_clean-3.3.1.0.xpi" }
+ { "version": "3.3.2.0",
+ "update_link": "https://gitlab.com/magnolia1234/bpc-uploads/-/raw/master/bypass_paywalls_clean-3.3.2.0.xpi" }
]
}
}