Fix Inc42 (js)

merge-requests/16/head
magnolia1234 9 months ago
parent 03dad196a9
commit ad6ae71a39

@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox
Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases
Post-release
Fix Inc42 (js)
Fix Tes Magazine (css)
Update block general paywall script (fix Ippen.space)

@ -3925,37 +3925,21 @@ else if (matchDomain(usa_hearst_comm_domains)) {
}
else if (matchDomain('inc42.com')) {
let url = window.location.href;
let paywall = document.querySelector('div#inc42_article_content_lock');
let article_sel = 'div.content-wrapper, section[amp-access="status"]';
if (paywall) {
removeDOMElement(paywall);
csDoneOnce = true;
let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split('?')[0];
replaceDomElementExt(url_cache, true, false, article_sel);
}
window.setTimeout(function () {
if (window.location.pathname.endsWith('/amp/')) {
let lazy_images = document.querySelectorAll('img.lazyload[src^="data:image/"][data-src]');
for (let elem of lazy_images) {
elem.src = elem.getAttribute('data-src');
elem.classList.remove('lazyload');
if (elem.width > 1000) {
let ratio = elem.width / 640;
if (window.navigator.userAgent.toLowerCase().includes('mobile'))
ratio = elem.width / 320;
elem.width = elem.width / ratio;
elem.height = elem.height / ratio;
}
}
}
let also_read = document.querySelector('div > .also-read');
if (also_read) {
let article = document.querySelector(article_sel);
if (article)
article.appendChild(also_read.parentNode);
if (window.location.pathname.endsWith('/amp/')) {
amp_unhide_access_hide('="status"', '="NOT status"', 'amp-ad, amp-embed, div.wru-widget');
let amp_images = document.querySelectorAll('body amp-img[src^="https://"]');
for (let amp_image of amp_images) {
let elem = document.createElement('img');
Object.assign(elem, {
src: amp_image.getAttribute('src'),
alt: amp_image.getAttribute('alt')
});
amp_image.parentNode.replaceChild(elem, amp_image);
}
}, 1000);
} else {
let banner = document.querySelector('div[id*="_leaderboard_"]');
hideDOMElement(banner);
}
}
else if (matchDomain('indianexpress.com')) {

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.3.2.1"
"version": "3.3.2.2"
}

@ -796,5 +796,5 @@
"*://*.wyleex.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.3.2.1"
"version": "3.3.2.2"
}

@ -1093,7 +1093,7 @@ var defaultSites = {
"Inc42": {
domain: "inc42.com",
allow_cookies: 1,
cs_dompurify: 1
block_regex: /(\.inc42\.com\/wp-content\/plugins\/leaky-paywall\/js\/leaky-paywall-cookie\.js|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/
},
"India Today": {
domain: "indiatoday.in",

@ -45,6 +45,12 @@
"block_regex": "(\\.tinypass\\.com|\\.blueconic\\.net)",
"upd_version": "3.3.0.8"
},
"Inc42": {
"domain": "inc42.com",
"allow_cookies": 1,
"block_regex": "(\\.inc42\\.com\\/wp-content\\/plugins\\/leaky-paywall\\/js\\/leaky-paywall-cookie\\.js|cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js)",
"upd_version": "3.3.2.2"
},
"Ippen.space": {
"domain": "ippen.space",
"allow_cookies": 1,

Loading…
Cancel
Save