mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 03:11:56 +01:00
Fix NyTeknik (images)
This commit is contained in:
parent
31cc550610
commit
bc719a40e1
4 changed files with 13 additions and 5 deletions
|
@ -8,6 +8,7 @@ Fix Gestion & El Comercio (Peru)
|
|||
Fix Handelsblatt (only non-premium articles)
|
||||
Fix Il Fatto Quotidiano
|
||||
Fix Il Secolo XIX (mobile)
|
||||
Fix NyTeknik (images)
|
||||
Fix NzHerald
|
||||
Fix shz.de & svz.de
|
||||
|
||||
|
|
|
@ -2306,12 +2306,10 @@ else if (matchDomain('nybooks.com')) {
|
|||
}
|
||||
|
||||
else if (matchDomain('nyteknik.se')) {
|
||||
// plus code in contentScript_once.js
|
||||
let locked_article = document.querySelector('div.locked-article');
|
||||
if (locked_article)
|
||||
locked_article.classList.remove('locked-article');
|
||||
let hidden_images = document.querySelectorAll('img[src=""][data-proxy-image]');
|
||||
for (let hidden_image of hidden_images)
|
||||
hidden_image.setAttribute('src', hidden_image.getAttribute('data-proxy-image').replace('_320', '_640'));
|
||||
}
|
||||
|
||||
else if (matchDomain('nytimes.com')) {
|
||||
|
|
|
@ -12,6 +12,14 @@ if (matchDomain('nationalgeographic.com')) {
|
|||
waitDOMElement('div[id^="fittPortal"]', 'DIV', natgeo_func, false);
|
||||
}
|
||||
|
||||
else if (matchDomain('nyteknik.se')) {
|
||||
window.setTimeout(function () {
|
||||
let hidden_images = document.querySelectorAll('img[src=""][data-proxy-image]');
|
||||
for (let hidden_image of hidden_images)
|
||||
hidden_image.setAttribute('src', hidden_image.getAttribute('data-proxy-image').replace('_320', '_640'));
|
||||
}, 2000); // Delay (in milliseconds)
|
||||
}
|
||||
|
||||
function matchDomain(domains, hostname) {
|
||||
var matched_domain = false;
|
||||
if (!hostname)
|
||||
|
|
|
@ -39,7 +39,8 @@
|
|||
],
|
||||
"content_scripts": [{
|
||||
"matches": [
|
||||
"*://*.nationalgeographic.com/*"
|
||||
"*://*.nationalgeographic.com/*",
|
||||
"*://*.nyteknik.se/*"
|
||||
],
|
||||
"run_at": "document_start",
|
||||
"js": ["contentScript_once.js"]
|
||||
|
@ -553,5 +554,5 @@
|
|||
"*://*.wallkit.net/*",
|
||||
"*://*.wsj.net/*"
|
||||
],
|
||||
"version": "2.3.5.5"
|
||||
"version": "2.3.5.6"
|
||||
}
|
Loading…
Reference in a new issue