From 5967eb7b2e868885829217795e4846b178ade523 Mon Sep 17 00:00:00 2001
From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com>
Date: Wed, 29 Apr 2020 20:46:44 +0200
Subject: [PATCH] Fix-update LaDepeche.fr
---
README.md | 4 ++--
contentScript.js | 13 ++++++++++---
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 386d8f6..7575edf 100644
--- a/README.md
+++ b/README.md
@@ -12,8 +12,8 @@
* [License](#license)
### Installation
-[Download and install the latest version](https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/downloads)
-Here you can also find a limited permissions version (custom sites will not be working though).
+[Download and install the latest version](https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/downloads)
+Here you can also find a limited permissions version (custom sites will not be working though).
Install add-on by downloading xpi-file.
### List of supported websites
diff --git a/contentScript.js b/contentScript.js
index bda00f2..9a94abe 100644
--- a/contentScript.js
+++ b/contentScript.js
@@ -457,11 +457,18 @@ else if (matchDomain("americanaffairsjournal.org")) {
}
else if (matchDomain('ladepeche.fr')) {
- document.addEventListener('DOMContentLoaded', () => {
+ window.setTimeout(function () {
const hidden_section = document.querySelector('.article-full__body-content');
- if (hidden_section)
+ if (hidden_section) {
hidden_section.classList.remove('article-full__body-content');
- });
+ let paras = hidden_section.querySelectorAll("p, h2, div");
+ for (let i = 0; i < paras.length; i++) {
+ paras[i].removeAttribute('style');
+ }
+ }
+ const abon = document.querySelector('#noscript-paywall-content, #noscript-paywall');
+ removeDOMElement(abon);
+ }, 500); // Delay (in milliseconds)
}
else if (matchDomain('challenges.fr')) {