From dcaf364abe81bb529927de02be4e618b9f6db5b3 Mon Sep 17 00:00:00 2001 From: Rodrigo Orem Date: Sat, 25 Jun 2022 20:28:12 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20Ga=C3=BAchaZH=20e=20aumenta=20vers=C3=A3?= =?UTF-8?q?o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/burlesco.user.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/burlesco.user.js b/src/burlesco.user.js index 1e5d35b..5262979 100644 --- a/src/burlesco.user.js +++ b/src/burlesco.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Burlesco // @namespace https://burles.co/ -// @version 12.0 +// @version 12.3 // @description Leia notícias sem ser assinante, burle o paywall // @author rodorgas & AugustoResende // @supportURL https://burles.co @@ -10,6 +10,7 @@ // @grant GM_webRequest // @grant GM_xmlhttpRequest // @connect gauchazh.clicrbs.com.br +// @connect gauchazh.clicrbs.com.br. // @connect static.infoglobo.com.br // @connect cdn.tinypass.com // @connect observador.pt @@ -81,7 +82,6 @@ // @webRequestItem {"selector":"*://cdn.tinypass.com/api/tinypass.min.js","action":"cancel"} // @webRequestItem {"selector":"*://api.tinypass.com/*","action":"cancel"} // @webRequestItem {"selector":"*://tm.jsuol.com.br/modules/content-gate.js","action":"cancel"} -// @webRequestItem {"selector":"*://gauchazh.clicrbs.com.br/static/main*","action":"cancel"} // @webRequestItem {"selector":"https://paywall.nsctotal.com.br/behaviors","action":"cancel"} // @webRequestItem {"selector":"*://*.estadao.com.br/paywall/*","action":"cancel"} // @webRequestItem {"selector":"*://www.folhadelondrina.com.br/login.php*","action":"cancel"} @@ -107,7 +107,7 @@ if (/gauchazh\.clicrbs\.com\.br/.test(document.location.host)) { function patchJs(jsurl) { GM_xmlhttpRequest({ method: 'GET', - url: jsurl, + url: jsurl.replace('com.br', '.com.br.'), onload: function(response) { var injectme = response.responseText; injectme = injectme.replace( @@ -138,6 +138,16 @@ if (/gauchazh\.clicrbs\.com\.br/.test(document.location.host)) { } check(); }; + + const cleanPaywallTracking = () => { + document.cookie = 'pwsi__zh=;domain=.clicrbs.com.br;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT'; + localStorage.removeItem('pwsi__zh'); + sessionStorage.removeItem('pwsi__zh'); + }; + cleanPaywallTracking(); + setTimeout(cleanPaywallTracking, 5000); + document.body.addEventListener('click', cleanPaywallTracking, true); + }