Fix TheTimes.co.uk (mobile images)

This commit is contained in:
magnolia1234 2024-02-12 10:43:31 +01:00
parent 116c8c7400
commit 5abb763b98
4 changed files with 17 additions and 64 deletions

View File

@ -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 TheTimes.co.uk (mobile images)
* v3.5.5.0 (2024-02-11)
Add DailyMail.co.uk

View File

@ -3142,12 +3142,20 @@ else if (matchDomain('thetimes.co.uk')) {
let url = window.location.href;
if (window.location.hostname !== 'epaper.thetimes.co.uk') {
func_post = function () {
let headings = document.querySelectorAll('div > div[role="heading"]');
for (let elem of headings)
elem.parentNode.style['margin-top'] = '50px';
let image_boxes = document.querySelectorAll('div[id*="."][style]');
for (let elem of image_boxes)
elem.style['margin-bottom'] = '50px';
let figure = document.querySelector('figure > div[style] > div[style]');
if (figure) {
figure.removeAttribute('style');
figure.parentNode.removeAttribute('style');
}
let style_new = 'display: block; margin-left: auto; margin-right: auto; width: 90%;';
let inline_images = document.querySelectorAll('img[style][src^="https"]');
for (let elem of inline_images) {
elem.style = style_new;
elem.parentNode.removeAttribute('style');
}
let headers = document.querySelectorAll('article:not([id]) div[style*="text-align"]');
for (let elem of headers)
elem.style = style_new + ' text-align: center;';
for (let n = 0; n < 5; n++) {
window.setTimeout(function () {
let page_scroll = document.querySelectorAll('html, body');

View File

@ -44,26 +44,6 @@
"block_regex_general": "\\.fewcents\\.co\\/.+\\/paywall.*\\.js",
"upd_version": "3.5.4.5"
},
"Funke Mediengruppe": {
"domain": "###_de_funke_medien",
"group": [
"ikz-online.de",
"nrz.de",
"waz.de",
"wp.de",
"wr.de"
],
"allow_cookies": 1,
"useragent": "googlebot",
"block_regex": "\\.tinypass\\.com\\/",
"upd_version": "3.5.2.2"
},
"Grupo Abril": {
"domain": "abril.com.br",
"allow_cookies": 1,
"block_regex": "\\.abril\\.com\\.br\\/.+\\/abril-paywall\\/",
"upd_version": "3.5.2.1"
},
"Grupo Prensa Ibérica": {
"domain": "###_es_epiberica",
"group": [
@ -84,35 +64,6 @@
"cs_code": "[{\"cond\":\"div.ft-helper-closenews\", \"rm_attrib\":\"class\"}]",
"upd_version": "3.5.4.1"
},
"Haaretz Group": {
"domain": "###_il_haaretz_group",
"group": [
"haaretz.co.il",
"haaretz.com",
"themarker.com"
],
"allow_cookies": 1,
"block_regex": "\\.co(m|\\.il)\\/.+\\/magazine\\/page-.+\\.js",
"useragent": "semrushbot",
"cs_dompurify": 1,
"upd_version": "3.5.2.3"
},
"Landwirtschaftsverlag": {
"domain": "###_de_lv",
"group": [
"profi.de",
"topagrar.com",
"wochenblatt.com"
],
"allow_cookies": 1,
"exception": [{
"domain": "topagrar.com",
"allow_cookies": 1,
"block_js_inline": "\\.topagrar\\.com\\/.+\\/news\\/"
}
],
"upd_version": "3.5.2.4"
},
"National Geographic USA": {
"domain": "nationalgeographic.com",
"allow_cookies": 1,
@ -120,13 +71,6 @@
"random_ip": "eu",
"upd_version": "3.5.4.2"
},
"Newsweek.pl": {
"domain": "newsweek.pl",
"allow_cookies": 1,
"add_ext_link": "div#contentPremiumPlaceholder|div#article-content-body",
"add_ext_link_type": "archive.is",
"upd_version": "3.5.2.2"
},
"Sophi.io": {
"domain": "sophi.io",
"allow_cookies": 1,

View File

@ -2,8 +2,8 @@
"addons": {
"magnolia@12.34": {
"updates": [
{ "version": "3.5.4.0",
"update_link": "https://gitlab.com/magnolia1234/bpc-uploads/-/raw/master/bypass_paywalls_clean-3.5.4.0.xpi" }
{ "version": "3.5.5.0",
"update_link": "https://gitlab.com/magnolia1234/bpc-uploads/-/raw/master/bypass_paywalls_clean-3.5.5.0.xpi" }
]
}
}