Skip to content

Commit

Permalink
Add support for Le Courrier des maires (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
Altonss authored Sep 2, 2024
1 parent 2652728 commit b69ba03
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Voici la liste triée par ordre alphabétique :
- [Sud Ouest](https://www.sudouest.fr/)
- [Le Télégramme](https://www.letelegramme.fr/)
- [Le Progrès](https://www.leprogres.fr/)
- [Le Courrier des maires](https://www.courrierdesmaires.fr/)

### Presse étrangère
- [Courrier international](https://www.courrierinternational.com)
Expand Down
13 changes: 13 additions & 0 deletions ophirofox/content_scripts/courrier-maires.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.ophirofox-europresse {
background-color: #fec22d;
padding: 1rem 1.5rem;
color: #262626;
text-align: center;
display: block;
margin-top: 1rem;
margin-bottom: 1rem;
}

.ophirofox-europresse:hover {
background-color: #e5ae29;
}
12 changes: 12 additions & 0 deletions ophirofox/content_scripts/courrier-maires.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
async function createLink() {
return await ophirofoxEuropresseLink();
}

async function onLoad() {
const statusElem = document.querySelector(".encartEssai");
const abo = document.querySelector(".etiquetteArt");
if (!statusElem || !abo) return;
statusElem.before(await createLink());
}

onLoad().catch(console.error);
12 changes: 12 additions & 0 deletions ophirofox/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,18 @@
"content_scripts/monde-diplo.js"
]
},
{
"matches": [
"https://www.courrierdesmaires.fr/*"
],
"js": [
"content_scripts/config.js",
"content_scripts/courrier-maires.js"
],
"css": [
"content_scripts/courrier-maires.css"
]
},
{
"matches": [
"https://www.la-croix.com/*"
Expand Down

0 comments on commit b69ba03

Please sign in to comment.