diff --git a/README.md b/README.md index 9b69f209..24372aa9 100644 --- a/README.md +++ b/README.md @@ -78,8 +78,6 @@ Voici la liste triée par ordre alphabétique : - [Le Temps (Suisse)](https://www.letemps.ch/) - [Le Vif (Belgique)](https://www.levif.be/) - [Sudinfo (Belgique)](https://www.sudinfo.be/) - - [The Economist (Royaume-Uni)](https://www.economist.com/) - - [The Washington Post (USA)](https://www.washingtonpost.com/) - [Trends-Tendances (Belgique)](https://trends.levif.be/) Vous pouvez proposer d'autres sites Web de médias en ouvrant une [demande ici-même](https://github.com/lovasoa/ophirofox/issues). diff --git a/ophirofox/content_scripts/theeconomist.css b/ophirofox/content_scripts/theeconomist.css deleted file mode 100644 index 6c4f40da..00000000 --- a/ophirofox/content_scripts/theeconomist.css +++ /dev/null @@ -1,9 +0,0 @@ -.ophirofox-europresse{ - display: inline-block; - margin-top: 1rem; - padding: 0.25rem 1rem; - border-radius: 0.3rem; - background-color: #ffc700; - color: #000; - text-decoration: none; -} \ No newline at end of file diff --git a/ophirofox/content_scripts/theeconomist.js b/ophirofox/content_scripts/theeconomist.js deleted file mode 100644 index 7115c41b..00000000 --- a/ophirofox/content_scripts/theeconomist.js +++ /dev/null @@ -1,33 +0,0 @@ -function extractKeywords() { - return document.querySelector("h1").textContent; -} - -async function createLink() { - const a = await ophirofoxEuropresseLink(extractKeywords()); - return a; -} - -async function onLoad() { - const callback = (mutationsList, observer) => { - for (const mutation of mutationsList) { - if(mutation.type === 'childList'){ - for(let node of mutation.addedNodes){ - const subscriptionElem = document.querySelector('section[data-body-id*="cp"]'); - if(node === subscriptionElem){ - const subtitle = document.querySelector('#new-article-template h1'); - createLink().then(function(data){ - subtitle.after(data); - }); - observer.disconnect(); - } - } - } - } - }; - - const htmlElement = document.querySelector('#new-article-template'); - const observer = new MutationObserver(callback); - observer.observe(htmlElement, { childList: true, subtree: true }); -} - -onLoad().catch(console.error); \ No newline at end of file diff --git a/ophirofox/content_scripts/washingtonpost.css b/ophirofox/content_scripts/washingtonpost.css deleted file mode 100644 index 2b5e838c..00000000 --- a/ophirofox/content_scripts/washingtonpost.css +++ /dev/null @@ -1,11 +0,0 @@ -.ophirofox-europresse { - display: flex; - justify-content: center; - margin: 1rem auto; - padding: 0.25rem 1rem; - width: 12vw; - border-radius: 0.3rem; - background-color: #ffc700; - color: #000; - text-decoration: none; -} \ No newline at end of file diff --git a/ophirofox/content_scripts/washingtonpost.js b/ophirofox/content_scripts/washingtonpost.js deleted file mode 100644 index bb4261ea..00000000 --- a/ophirofox/content_scripts/washingtonpost.js +++ /dev/null @@ -1,35 +0,0 @@ -function extractKeywords() { - const titleElem = document.querySelector("h1#main-content"); - return titleElem.textContent; -} - -async function createLink() { - const a = await ophirofoxEuropresseLink(extractKeywords()); - return a; -} - -async function onLoad() { - let linkAdded = false; - const callback = (mutationsList, observer) => { - for (const mutation of mutationsList) { - if(!linkAdded){ - const paywall_modal = document.querySelector('[data-qa="overlay-container"]'); - const paywall_bottom = document.querySelector('#wall-bottom-drawer'); - if(paywall_modal !== null || paywall_bottom !== null){ - const title_bottom = document.querySelector('h1#HEADER'); - createLink().then(function(data){ - title_bottom.after(data); - }); - linkAdded = true; - observer.disconnect(); - } - } - } - }; - - const htmlElement = document.querySelector('body'); - const observer = new MutationObserver(callback); - observer.observe(htmlElement, { attributes: true, subtree: true }); -} - -onLoad().catch(console.error); \ No newline at end of file