Skip to content

Commit

Permalink
Update la-provence.js (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
Altonss authored Sep 3, 2024
1 parent b69ba03 commit c712167
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ophirofox/content_scripts/la-provence.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit c712167

Please sign in to comment.