From 1521d03e82b2332dfff3d7dde4336eec0ad52ef1 Mon Sep 17 00:00:00 2001 From: Rodrigo O Date: Sun, 20 Sep 2020 14:01:27 -0300 Subject: [PATCH] Adiciona delay para remover o overlay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit O paywall é acionado assincronamente, então pode ser necessário esperar um tempo até que ele esteja ativo, para desativá-lo. --- src/content.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/content.js b/src/content.js index 56af5b4..e65d1ca 100644 --- a/src/content.js +++ b/src/content.js @@ -1,8 +1,10 @@ // run_at: document_idle const ABRIL_CODE = ` - document.querySelector('body').classList.remove('disabledByPaywall') - document.querySelector('.piano-offer-overlay').remove() - document.querySelector('#piano_offer').remove() + window.setTimeout(function() { + document.querySelector('body').classList.remove('disabledByPaywall') + document.querySelector('.piano-offer-overlay').remove() + document.querySelector('#piano_offer').remove() + }, 10000) `; const INJECTION = {