From ff081563c37d09cd71163ab9970f5b928b8b443a Mon Sep 17 00:00:00 2001 From: Serpa Date: Sat, 12 Sep 2020 12:32:04 +0100 Subject: [PATCH] FIX bug #14 --- js/extension/deletenonio.js | 2 +- js/extension/deletenonio.min.js | 2 +- js/userscript/deletenonio.min.user.js | 5 +++-- js/userscript/deletenonio.user.js | 5 +++-- manifest.json | 2 +- popup/popup.html | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/js/extension/deletenonio.js b/js/extension/deletenonio.js index 233221b..5e5f2d4 100644 --- a/js/extension/deletenonio.js +++ b/js/extension/deletenonio.js @@ -2,7 +2,7 @@ const deleteNonio = { el: { html: document.documentElement, body: document.body, - globalmediaGroupUrls: ['dinheirovivo.pt', 'tsf.pt', 'vdigital.pt', 'ojogo.pt', 'jn.pt', 'dn.pt', 'n-tv.pt'], + globalmediaGroupUrls: ['dinheirovivo.pt', 'tsf.pt', 'vdigital.pt', 'ojogo.pt', 'jn.pt', 'dn.pt', 'n-tv.pt', 'evasoes.pt'], cofinaGroupURLs: ['record.pt', 'cmjornal.pt', 'cm-tv.pt', 'jornaldenegocios.pt', 'destak.pt', 'flash.pt', 'vidas.pt', 'maxima.pt', 'sabado.pt', 'empregosonline.pt', 'classficadoscm.pt', 'aquelamaquina.pt'], renascencaGroupUrls: ['rr.sapo.pt', 'rfm.sapo.pt', 'megahits.sapo.pt', 'radiosim.sapo.pt'] }, diff --git a/js/extension/deletenonio.min.js b/js/extension/deletenonio.min.js index 5cf6979..39db9ba 100644 --- a/js/extension/deletenonio.min.js +++ b/js/extension/deletenonio.min.js @@ -1 +1 @@ -const deleteNonio={el:{html:document.documentElement,body:document.body,globalmediaGroupUrls:["dinheirovivo.pt","tsf.pt","vdigital.pt","ojogo.pt","jn.pt","dn.pt","n-tv.pt"],cofinaGroupURLs:["record.pt","cmjornal.pt","cm-tv.pt","jornaldenegocios.pt","destak.pt","flash.pt","vidas.pt","maxima.pt","sabado.pt","empregosonline.pt","classficadoscm.pt","aquelamaquina.pt"],renascencaGroupUrls:["rr.sapo.pt","rfm.sapo.pt","megahits.sapo.pt","radiosim.sapo.pt"]},removeElement(e){document.querySelectorAll(e)[0]&&(clearInterval(this.hasElement),this.el.html.style="overflow: auto !important",this.el.body.style="overflow: auto !important",document.querySelectorAll(e)[0].outerHTML="")},events(){this.hasElement=setInterval(()=>{this.removeElement("#imp-content-gate-root"),this.removeElement("#nonio-basiclogin"),this.removeElement('[id^="layer_gatting"]'),this.removeElement(".nonioBox"),this.removeElement(".warning-nonio-overlay"),this.removeElement(".tp-modal"),this.removeElement(".tp-backdrop"),this.removeElement(".tp-iframe-wrapper"),this.removeElement("#wrapperContentGatingNonio"),this.removeElement('#contentGateLoginDiv'),this.removeElement(".brand__expresso")},1000)},cofinaGroupVideosFix(){this.el.cofinaGroupURLs.forEach(e=>{window.location.href.indexOf(e)>-1&&this.hasElement&&document.cookie.split(";").forEach(e=>document.cookie=e.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`))})},globalmediaGroupFix(){this.el.globalmediaGroupUrls.forEach(e=>{window.location.href.indexOf(e)>-1&&(document.cookie.split(";").forEach(e=>document.cookie=e.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`)),window.addEventListener("load",()=>this.removeElement('iframe[src^="/content"]')))})},renascencaGroupFix(){clearInterval(this.setOverflow),this.el.renascencaGroupUrls.forEach(e=>{window.location.href.indexOf(e)>-1&&(this.setOverflow=setInterval(()=>{this.el.html.style="overflow: auto !important",this.el.body.style="overflow: auto !important"},1000))})},init(){this.events(),this.cofinaGroupVideosFix(),this.globalmediaGroupFix(),this.renascencaGroupFix()}};function handleResponse(){deleteNonio.init()}function handleError(e){console.log(`Error: ${e}`)}function sendMessageNotification(){browser.runtime.sendMessage({status:"done"}).then(handleResponse,handleError)}sendMessageNotification(); \ No newline at end of file +const deleteNonio={el:{html:document.documentElement,body:document.body,globalmediaGroupUrls:["dinheirovivo.pt","tsf.pt","vdigital.pt","ojogo.pt","jn.pt","dn.pt","n-tv.pt","evasoes.pt"],cofinaGroupURLs:["record.pt","cmjornal.pt","cm-tv.pt","jornaldenegocios.pt","destak.pt","flash.pt","vidas.pt","maxima.pt","sabado.pt","empregosonline.pt","classficadoscm.pt","aquelamaquina.pt"],renascencaGroupUrls:["rr.sapo.pt","rfm.sapo.pt","megahits.sapo.pt","radiosim.sapo.pt"]},removeElement(e){document.querySelectorAll(e)[0]&&(clearInterval(this.hasElement),this.el.html.style="overflow: auto !important",this.el.body.style="overflow: auto !important",document.querySelectorAll(e)[0].outerHTML="")},events(){this.hasElement=setInterval(()=>{this.removeElement("#imp-content-gate-root"),this.removeElement("#nonio-basiclogin"),this.removeElement('[id^="layer_gatting"]'),this.removeElement(".nonioBox"),this.removeElement(".warning-nonio-overlay"),this.removeElement(".tp-modal"),this.removeElement(".tp-backdrop"),this.removeElement(".tp-iframe-wrapper"),this.removeElement("#wrapperContentGatingNonio"),this.removeElement('#contentGateLoginDiv'),this.removeElement(".brand__expresso")},1000)},cofinaGroupVideosFix(){this.el.cofinaGroupURLs.forEach(e=>{window.location.href.indexOf(e)>-1&&this.hasElement&&document.cookie.split(";").forEach(e=>document.cookie=e.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`))})},globalmediaGroupFix(){this.el.globalmediaGroupUrls.forEach(e=>{window.location.href.indexOf(e)>-1&&(document.cookie.split(";").forEach(e=>document.cookie=e.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`)),window.addEventListener("load",()=>this.removeElement('iframe[src^="/content"]')))})},renascencaGroupFix(){clearInterval(this.setOverflow),this.el.renascencaGroupUrls.forEach(e=>{window.location.href.indexOf(e)>-1&&(this.setOverflow=setInterval(()=>{this.el.html.style="overflow: auto !important",this.el.body.style="overflow: auto !important"},1000))})},init(){this.events(),this.cofinaGroupVideosFix(),this.globalmediaGroupFix(),this.renascencaGroupFix()}};function handleResponse(){deleteNonio.init()}function handleError(e){console.log(`Error: ${e}`)}function sendMessageNotification(){browser.runtime.sendMessage({status:"done"}).then(handleResponse,handleError)}sendMessageNotification(); \ No newline at end of file diff --git a/js/userscript/deletenonio.min.user.js b/js/userscript/deletenonio.min.user.js index 0aae8b0..6e0465d 100644 --- a/js/userscript/deletenonio.min.user.js +++ b/js/userscript/deletenonio.min.user.js @@ -4,7 +4,7 @@ // @namespace https://github.com/dippas/DeleteNonio/ // @homepage https://github.com/dippas/DeleteNonio/ // @description Remover NONIO. Sempre actualizado para remover o nonio dos sites. Disponível como script e Extensão para Firefox e Chrome. -// @version 1.6.3 +// @version 1.6.4 // @supportURL https://github.com/dippas/DeleteNonio/issues // @downloadURL https://raw.githubusercontent.com/dippas/DeleteNonio/master/js/userscript/deletenonio.user.js // @match https://*.aquelamaquina.pt/* @@ -42,7 +42,8 @@ // @match http://*.empregosonline.pt/* // @match https://*.classificadoscm.pt/* // @match https://*.n-tv.pt/* +// @match https://*.evasoes.pt/* // @grant none // ==/UserScript== -const deleteNonio={el:{html:document.documentElement,body:document.body,globalmediaGroupUrls:["dinheirovivo.pt","tsf.pt","vdigital.pt","ojogo.pt","jn.pt","dn.pt","n-tv.pt"],cofinaGroupURLs:["record.pt","cmjornal.pt","cm-tv.pt","jornaldenegocios.pt","destak.pt","flash.pt","vidas.pt","maxima.pt","sabado.pt","empregosonline.pt","classficadoscm.pt","aquelamaquina.pt"],renascencaGroupUrls:["rr.sapo.pt","rfm.sapo.pt","megahits.sapo.pt","radiosim.sapo.pt"]},removeElement(e){document.querySelectorAll(e)[0]&&(clearInterval(this.hasElement),this.el.html.style="overflow: auto !important",this.el.body.style="overflow: auto !important",document.querySelectorAll(e)[0].outerHTML="")},events(){this.hasElement=setInterval(()=>{this.removeElement("#imp-content-gate-root"),this.removeElement("#nonio-basiclogin"),this.removeElement('[id^="layer_gatting"]'),this.removeElement(".nonioBox"),this.removeElement(".warning-nonio-overlay"),this.removeElement(".tp-modal"),this.removeElement(".tp-backdrop"),this.removeElement(".tp-iframe-wrapper"),this.removeElement("#wrapperContentGatingNonio"),this.removeElement('#contentGateLoginDiv'),this.removeElement(".brand__expresso")},1000)},cofinaGroupVideosFix(){this.el.cofinaGroupURLs.forEach(e=>{window.location.href.indexOf(e)>-1&&this.hasElement&&document.cookie.split(";").forEach(e=>document.cookie=e.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`))})},globalmediaGroupFix(){this.el.globalmediaGroupUrls.forEach(e=>{window.location.href.indexOf(e)>-1&&(document.cookie.split(";").forEach(e=>document.cookie=e.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`)),window.addEventListener("load",()=>this.removeElement('iframe[src^="/content"]')))})},renascencaGroupFix(){clearInterval(this.setOverflow),this.el.renascencaGroupUrls.forEach(e=>{window.location.href.indexOf(e)>-1&&(this.setOverflow=setInterval(()=>{this.el.html.style="overflow: auto !important",this.el.body.style="overflow: auto !important"},1000))})},init(){this.events(),this.cofinaGroupVideosFix(),this.globalmediaGroupFix(),this.renascencaGroupFix()}};deleteNonio.init(); \ No newline at end of file +const deleteNonio={el:{html:document.documentElement,body:document.body,globalmediaGroupUrls:["dinheirovivo.pt","tsf.pt","vdigital.pt","ojogo.pt","jn.pt","dn.pt","n-tv.pt","evasoes.pt"],cofinaGroupURLs:["record.pt","cmjornal.pt","cm-tv.pt","jornaldenegocios.pt","destak.pt","flash.pt","vidas.pt","maxima.pt","sabado.pt","empregosonline.pt","classficadoscm.pt","aquelamaquina.pt"],renascencaGroupUrls:["rr.sapo.pt","rfm.sapo.pt","megahits.sapo.pt","radiosim.sapo.pt"]},removeElement(e){document.querySelectorAll(e)[0]&&(clearInterval(this.hasElement),this.el.html.style="overflow: auto !important",this.el.body.style="overflow: auto !important",document.querySelectorAll(e)[0].outerHTML="")},events(){this.hasElement=setInterval(()=>{this.removeElement("#imp-content-gate-root"),this.removeElement("#nonio-basiclogin"),this.removeElement('[id^="layer_gatting"]'),this.removeElement(".nonioBox"),this.removeElement(".warning-nonio-overlay"),this.removeElement(".tp-modal"),this.removeElement(".tp-backdrop"),this.removeElement(".tp-iframe-wrapper"),this.removeElement("#wrapperContentGatingNonio"),this.removeElement('#contentGateLoginDiv'),this.removeElement(".brand__expresso")},1000)},cofinaGroupVideosFix(){this.el.cofinaGroupURLs.forEach(e=>{window.location.href.indexOf(e)>-1&&this.hasElement&&document.cookie.split(";").forEach(e=>document.cookie=e.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`))})},globalmediaGroupFix(){this.el.globalmediaGroupUrls.forEach(e=>{window.location.href.indexOf(e)>-1&&(document.cookie.split(";").forEach(e=>document.cookie=e.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`)),window.addEventListener("load",()=>this.removeElement('iframe[src^="/content"]')))})},renascencaGroupFix(){clearInterval(this.setOverflow),this.el.renascencaGroupUrls.forEach(e=>{window.location.href.indexOf(e)>-1&&(this.setOverflow=setInterval(()=>{this.el.html.style="overflow: auto !important",this.el.body.style="overflow: auto !important"},1000))})},init(){this.events(),this.cofinaGroupVideosFix(),this.globalmediaGroupFix(),this.renascencaGroupFix()}};deleteNonio.init(); \ No newline at end of file diff --git a/js/userscript/deletenonio.user.js b/js/userscript/deletenonio.user.js index 76f9410..4d41d18 100644 --- a/js/userscript/deletenonio.user.js +++ b/js/userscript/deletenonio.user.js @@ -4,7 +4,7 @@ // @namespace https://github.com/dippas/DeleteNonio/ // @homepage https://github.com/dippas/DeleteNonio/ // @description Remover NONIO. Sempre actualizado para remover o nonio dos sites. Disponível como script e Extensão para Firefox e Chrome. -// @version 1.6.3 +// @version 1.6.4 // @supportURL https://github.com/dippas/DeleteNonio/issues // @downloadURL https://raw.githubusercontent.com/dippas/DeleteNonio/master/js/userscript/deletenonio.user.js // @match https://*.aquelamaquina.pt/* @@ -42,6 +42,7 @@ // @match http://*.empregosonline.pt/* // @match https://*.classificadoscm.pt/* // @match https://*.n-tv.pt/* +// @match https://*.evasoes.pt/* // @grant none // ==/UserScript== @@ -49,7 +50,7 @@ const deleteNonio = { el: { html: document.documentElement, body: document.body, - globalmediaGroupUrls: ['dinheirovivo.pt', 'tsf.pt', 'vdigital.pt', 'ojogo.pt', 'jn.pt', 'dn.pt', 'n-tv.pt'], + globalmediaGroupUrls: ['dinheirovivo.pt', 'tsf.pt', 'vdigital.pt', 'ojogo.pt', 'jn.pt', 'dn.pt', 'n-tv.pt', 'evasoes.pt'], cofinaGroupURLs: ['record.pt', 'cmjornal.pt', 'cm-tv.pt', 'jornaldenegocios.pt', 'destak.pt', 'flash.pt', 'vidas.pt', 'maxima.pt', 'sabado.pt', 'empregosonline.pt', 'classficadoscm.pt', 'aquelamaquina.pt'], renascencaGroupUrls: ['rr.sapo.pt', 'rfm.sapo.pt', 'megahits.sapo.pt', 'radiosim.sapo.pt'] }, diff --git a/manifest.json b/manifest.json index 54e81de..685a1ce 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "DeleteNonio", - "version": "1.6.3", + "version": "1.6.4", "author": "dippas", "description": "Remover NONIO. Sempre actualizado para remover o nonio dos sites. Disponível como extensão para Firefox e Chrome.", diff --git a/popup/popup.html b/popup/popup.html index d545767..04888f0 100644 --- a/popup/popup.html +++ b/popup/popup.html @@ -9,7 +9,7 @@ -

DeleteNonio v1.6.3

+

DeleteNonio v1.6.4

Remover Nonio popup dos sites

Buy me a coffee