-
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨Support du média Le Télégramme (#200)
* ✨Support du média Le Télégramme Close #197 * 💄 Corrige l'apparence du bouton sur le Télégramme * 📝 Met à jour le README * 📝 Corrige des typos * 📝 Applique un commentaire de review Co-authored-by: Ophir LOJKINE <contact@ophir.dev> * 📝 Applique un commentaire de review Co-authored-by: Ophir LOJKINE <contact@ophir.dev> * 🎨 Réapplique un choix de style JS --------- Co-authored-by: Ophir LOJKINE <contact@ophir.dev>
- Loading branch information
Showing
4 changed files
with
107 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.ophirofox-europresse { | ||
margin-bottom: 24px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
function extractKeywords() { | ||
return document.querySelector("h1").textContent; | ||
} | ||
|
||
async function createLink() { | ||
const a = await ophirofoxEuropresseLink(extractKeywords()); | ||
a.classList.add("tlg-btn", "tlg-btn-premium"); | ||
return a; | ||
} | ||
|
||
function findPremiumBanner() { | ||
return document.querySelector(".tlg-article-premium"); | ||
} | ||
|
||
async function onLoad() { | ||
const premiumBanner = findPremiumBanner(); | ||
if (!premiumBanner) return; | ||
premiumBanner.after(await createLink()); | ||
} | ||
|
||
onLoad().catch(console.error); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters