From c7121677cff5c76741f355880dceb2e92773e735 Mon Sep 17 00:00:00 2001 From: Altonss <66519591+Altonss@users.noreply.github.com> Date: Tue, 3 Sep 2024 19:15:01 +0200 Subject: [PATCH] Update la-provence.js (#254) --- ophirofox/content_scripts/la-provence.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ophirofox/content_scripts/la-provence.js b/ophirofox/content_scripts/la-provence.js index 63da85e0..16a99350 100644 --- a/ophirofox/content_scripts/la-provence.js +++ b/ophirofox/content_scripts/la-provence.js @@ -6,10 +6,10 @@ async function createLink() { function findPremiumBanner() { - const title = document.querySelector(".header-article-premium__stamp"); - if (!title) return null; - const elems = title.parentElement.querySelectorAll("span"); - return [...elems].find(d => d.textContent.includes("Article réservé aux abonnés")) + const array = document.querySelectorAll(".rev-margin-0.rev-text-xs-bold"); + const reserve = Array.from(array).find(p => p.textContent.includes("Article réservé aux abonnés")); + if (!reserve) return null; + return reserve } async function onLoad() {