Skip to content

Commit

Permalink
ajout d'un lien à l'intérieur du paywall pour lemonde
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Aug 18, 2023
1 parent 0eb3616 commit f27f6f2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
1 change: 0 additions & 1 deletion ophirofox/content_scripts/lemonde.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.ophirofox-europresse {
color: black;
margin-left: 7px;
z-index: 10;
}

#js-message-register{
Expand Down
11 changes: 9 additions & 2 deletions ophirofox/content_scripts/lemonde.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ async function createLink() {

async function onLoad() {
const statusElem = document.querySelector(".article__status");
if (!statusElem) return;
statusElem.appendChild(await createLink());
if (statusElem) {
statusElem.appendChild(await createLink());
}
const paywallElem = document.querySelector(".paywall-04__cta");
if (paywallElem) {
const link = await createLink();
link.className = "lmd-btn lmd-btn--l lmd-btn--premium paywall-04__cta";
paywallElem.parentNode.insertBefore(link, paywallElem);
}
}

onLoad().catch(console.error);
2 changes: 1 addition & 1 deletion ophirofox/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Ophirofox",
"version": "2.0",
"version": "2.1",
"description": "Lire les articles du monde, du figaro, et d'autres journaux grâce à sa connexion europresse",
"icons": {
"48": "icons/48.png",
Expand Down

0 comments on commit f27f6f2

Please sign in to comment.