Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions ophirofox/content_scripts/le-parisien.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

function extractKeywords() {
return document.querySelector("h1").textContent;
}
Expand All @@ -15,7 +14,7 @@ async function addEuropresseButton() {
}

async function onLoad() {
const bannerSelector = document.querySelector(".btn-subscribe");
const bannerSelector = document.querySelector(".article-section .paywall-abo, .btn-subscribe");
if (bannerSelector) {
addEuropresseButton();
} else {
Expand All @@ -26,7 +25,11 @@ async function onLoad() {
for (const mutation of mutationList) {
for (const e of mutation.addedNodes) {
const bannerSelectorString = 'btn-subscribe';
if (e.className == bannerSelectorString) {
if (
e.classList?.contains(bannerSelectorString) ||
e.classList?.contains('paywall-abo') ||
e.querySelector?.('.paywall-abo')
) {
observer.disconnect();
elementFound = true;
addEuropresseButton();
Expand Down
Loading