diff --git a/README.md b/README.md index f229216..52f04e9 100644 --- a/README.md +++ b/README.md @@ -737,6 +737,8 @@ Grouped in options:\ [Las Provincias](https://www.lasprovincias.es) - [Sur](https://www.diariosur.es) +*[Sport Life Ibérica](https://www.sportlifeiberica.es/)* sites (opt-in to custom sites) + ##### Sweden [Aftonbladet](https://www.aftonbladet.se) - [Dagens ETC](https://www.etc.se) - diff --git a/background.js b/background.js index cb101a5..f60da7d 100644 --- a/background.js +++ b/background.js @@ -1317,11 +1317,12 @@ function clear_cookies() { change_headers.push(custom_domain); } } - let custom_amp_unhide = rules.amp_unhide; - if (custom_amp_unhide) { + if (rules.amp_unhide) { if (!amp_unhide.includes(custom_domain)) amp_unhide.push(custom_domain); } + if (rules.ld_json) + ld_json[custom_domain] = rules.ld_json; custom_flex_domains.push(custom_domain); if (!enabledSites.includes(custom_domain)) enabledSites.push(custom_domain); diff --git a/changelog.txt b/changelog.txt index 1b6914c..e4eb07d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -8,6 +8,7 @@ Add Le Figaro (link to archive.is) Add Libelle.nl Add Margriet.nl Add Revue Conflits +Add Sport Life Iberica (opt-in to custom sites) Remove Cellesche Zeitung (fix obsolete) Fix Automobilwoche.de (js) Fix Faz.net (json) diff --git a/contentScript.js b/contentScript.js index ed7e3d0..1eb6e93 100644 --- a/contentScript.js +++ b/contentScript.js @@ -73,7 +73,6 @@ if (bg2csData.ld_json) { json_key = Object.keys(json).find(key => key.match(/^articlebody$/i)) || Object.keys(json).find(key => key.match(/^text$/i)); json_text = parseHtmlEntities(json[json_key]); } - console.log(json_text); let content = document.querySelector(article_sel); if (json_text && content) { let parser = new DOMParser(); diff --git a/contentScript_once.js b/contentScript_once.js index 07b7445..74b11e3 100644 --- a/contentScript_once.js +++ b/contentScript_once.js @@ -65,6 +65,8 @@ window.setTimeout(function () { } else if (hostname.match(/\.(es|cat)$/) || matchDomain(['diariocordoba.com', 'elperiodicodearagon.com', 'elperiodicoextremadura.com', 'elperiodicomediterraneo.com', 'emporda.info'])) { if (document.querySelector('link[href*="/estaticos-cdn."]')) group = '###_es_epiberica'; + else if (document.querySelector('div > ul > li > a[href="https://www.sportlife.es/"]')) + group = '###_es_sport_life'; } else if (hostname.endsWith('.fi')) { if (document.querySelector('link[href^="https://assets.almatalent.fi"]')) group = '###_fi_alma_talent';// no fix diff --git a/custom/manifest.json b/custom/manifest.json index 3035942..dee9c06 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.1.0.8" + "version": "3.1.0.9" } diff --git a/manifest.json b/manifest.json index dd09760..2b213c6 100644 --- a/manifest.json +++ b/manifest.json @@ -744,5 +744,5 @@ "*://*.wallkit.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.1.0.8" + "version": "3.1.0.9" } diff --git a/sites.js b/sites.js index 116cf9b..9f04922 100644 --- a/sites.js +++ b/sites.js @@ -1730,6 +1730,12 @@ var defaultSites = { domain: "infzm.com", allow_cookies: 1 }, + "Sport Life Ibérica (text only; opt-in to custom sites)": { + domain: "###_es_sport_life", + group: [], + allow_cookies: 1, + ld_json: "div.c-paywall|div.c-mainarticle__body" + }, "Sports Illustrated": { domain: "si.com", allow_cookies: 1,