-
-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ajout de La DH, l'Avenir et Sudinfo (quotidiens belges) (#186)
* Add js & css files for laDH, lavenir et sudinfo * Update README.md * update manifest.json for laDH, lavenir & sudinfo
- Loading branch information
Showing
8 changed files
with
126 additions
and
0 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,11 @@ | ||
.ophirofox-europresse { | ||
display: inline-block; | ||
margin: 0 0.7em 0 0.1em; | ||
padding: 0 1em; | ||
border-radius: 0.25rem; | ||
background-color: #f7b500; | ||
color: #000 !important; | ||
font-size: small; | ||
vertical-align: middle; | ||
line-height: 2.7; | ||
} |
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,18 @@ | ||
function extractKeywords() { | ||
return document.querySelector("h1").textContent; | ||
} | ||
|
||
async function createLink() { | ||
const a = await ophirofoxEuropresseLink(extractKeywords()); | ||
return a; | ||
} | ||
|
||
async function onLoad() { | ||
const statusElem = document.getElementsByClassName("ap-PaidPicto"); | ||
if (statusElem.length == 0) return; | ||
statusElem[0].after(await createLink()); | ||
} | ||
|
||
onLoad().catch(console.error); | ||
|
||
//OK |
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,11 @@ | ||
.ophirofox-europresse { | ||
display: inline-block; | ||
margin: 0.4em 0.7em 0 -0.25em; | ||
padding: 0 1em; | ||
border-radius: 0.25em; | ||
background-color: #ffcb00; | ||
color: #000 !important; | ||
font-size: small; | ||
vertical-align: top; | ||
line-height: 2.5; | ||
} |
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,16 @@ | ||
function extractKeywords() { | ||
return document.querySelector("h1").textContent; | ||
} | ||
|
||
async function createLink() { | ||
const a = await ophirofoxEuropresseLink(extractKeywords()); | ||
return a; | ||
} | ||
|
||
async function onLoad() { | ||
const statusElem = document.getElementsByClassName("ap-PaidPicto"); | ||
if (statusElem.length == 0) return; | ||
statusElem[0].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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.ophirofox-europresse { | ||
display: inline-block; | ||
padding: 3px 5px 1px 5px; | ||
background-color: #ffc549; | ||
color: #000; | ||
vertical-align: bottom; | ||
font-weight: bold; | ||
} |
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,23 @@ | ||
function extractKeywords() { | ||
return document.querySelector("h1").textContent; | ||
} | ||
|
||
async function createLink() { | ||
const a = await ophirofoxEuropresseLink(extractKeywords()); | ||
return a; | ||
} | ||
|
||
function findPremiumBanner() { | ||
const title = document.querySelector("h1"); | ||
if (!title) return null; | ||
const elems = title.parentElement.querySelectorAll("span"); | ||
return [...elems].find(d => d.classList.contains("r-article--payant")); | ||
} | ||
|
||
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