From 6691b162a46317fdaae0a9adad90606e33c73112 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 9 Sep 2020 08:24:02 +0200 Subject: [PATCH] Fix-update Economist & FT (layout) --- background.js | 1 + contentScript.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/background.js b/background.js index 301954c..619f92f 100644 --- a/background.js +++ b/background.js @@ -10,6 +10,7 @@ var ext_api = (typeof browser === 'object') ? browser : chrome; const restrictions = { 'barrons.com': /.+barrons\.com\/(amp\/)?article(s)?\/.+/, 'elcomercio.pe': /.+\/elcomercio.pe\/.+((\w)+(\-)+){3,}.+/, + 'ft.com': /.+\.ft\.com\/content\/.+/, 'gestion.pe': /.+\/gestion.pe\/.+((\w)+(\-)+){3,}.+/, 'quora.com': /^((?!quora\.com\/search\?q=).)*$/, 'seekingalpha.com': /.+seekingalpha\.com\/article\/.+/, diff --git a/contentScript.js b/contentScript.js index 845a2f5..44e4e00 100644 --- a/contentScript.js +++ b/contentScript.js @@ -275,8 +275,9 @@ else if (matchDomain("economist.com")) { const subscribe = document.querySelector('.subscription-proposition'); const wrapper = document.getElementById('bottom-page-wrapper'); removeDOMElement(subscribe, wrapper); - const adverts = document.querySelectorAll('.advert'); - removeDOMElement(...adverts); + const adverts = document.querySelectorAll('div.advert'); + for (let advert of adverts) + advert.setAttribute('style', 'display:none'); window.setTimeout(function () { const paywall = document.querySelector('.layout-article-regwall'); ; if (paywall) {