From 1555537361233ab060083dce37a8cf04edd118db Mon Sep 17 00:00:00 2001 From: Ophir LOJKINE Date: Fri, 29 Jan 2021 22:00:50 +0100 Subject: [PATCH] Adaptation aux changements sur le site du figaro --- ophirofox/content_scripts/lefigaro.css | 7 +------ ophirofox/content_scripts/lefigaro.js | 6 +++--- ophirofox/manifest.json | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/ophirofox/content_scripts/lefigaro.css b/ophirofox/content_scripts/lefigaro.css index 21a243c..6613018 100644 --- a/ophirofox/content_scripts/lefigaro.css +++ b/ophirofox/content_scripts/lefigaro.css @@ -1,8 +1,3 @@ .ophirofox-europresse { - margin:0 8px; - padding:4px 16px; - display:block; - font-family:source-sans-pro,sans-serif; - background-color:#fff7E4; - color:#163860; + margin-left: 10px; } \ No newline at end of file diff --git a/ophirofox/content_scripts/lefigaro.js b/ophirofox/content_scripts/lefigaro.js index 135f696..d16d4b7 100644 --- a/ophirofox/content_scripts/lefigaro.js +++ b/ophirofox/content_scripts/lefigaro.js @@ -14,7 +14,7 @@ function createLink() { const a = document.createElement("a"); a.href = makeEuropresseUrl(new URL(window.location)); a.textContent = "Lire sur Europresse"; - a.className = "ophirofox-europresse"; + a.className = "fig-premium-mark-article__text ophirofox-europresse"; return a; } @@ -22,8 +22,8 @@ function createLink() { function findPremiumBanner() { const title = document.querySelector("h1"); if (!title) return null; - const divs = title.parentElement.querySelectorAll("div>div"); - return [...divs].find(d => d.textContent.includes("Réservé aux abonnés")) + const elems = title.parentElement.querySelectorAll("span"); + return [...elems].find(d => d.textContent.includes("Réservé aux abonnés")) } function onLoad() { diff --git a/ophirofox/manifest.json b/ophirofox/manifest.json index 68f98b8..2886026 100644 --- a/ophirofox/manifest.json +++ b/ophirofox/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Ophirofox", - "version": "1.5", + "version": "1.6", "description": "Lire les articles du monde grâce à sa connexion europresse", "icons": { "48": "icons/48.png",