Skip to content

Commit

Permalink
Adaptation aux changements sur le site du figaro
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Jan 29, 2021
1 parent bbd7f6d commit 1555537
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
7 changes: 1 addition & 6 deletions ophirofox/content_scripts/lefigaro.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
.ophirofox-europresse {
margin:0 8px;
padding:4px 16px;
display:block;
font-family:source-sans-pro,sans-serif;
background-color:#fff7E4;
color:#163860;
margin-left: 10px;
}
6 changes: 3 additions & 3 deletions ophirofox/content_scripts/lefigaro.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ function createLink() {
const a = document.createElement("a");
a.href = makeEuropresseUrl(new URL(window.location));
a.textContent = "Lire sur Europresse";
a.className = "ophirofox-europresse";
a.className = "fig-premium-mark-article__text ophirofox-europresse";
return a;
}


function findPremiumBanner() {
const title = document.querySelector("h1");
if (!title) return null;
const divs = title.parentElement.querySelectorAll("div>div");
return [...divs].find(d => d.textContent.includes("Réservé aux abonnés"))
const elems = title.parentElement.querySelectorAll("span");
return [...elems].find(d => d.textContent.includes("Réservé aux abonnés"))
}

function onLoad() {
Expand Down
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": "1.5",
"version": "1.6",
"description": "Lire les articles du monde grâce à sa connexion europresse",
"icons": {
"48": "icons/48.png",
Expand Down

0 comments on commit 1555537

Please sign in to comment.