From 37a8100c792fb87bbea9154e7922cb2c27e6e7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mauro=20Mascarenhas=20de=20Ara=C3=BAjo?= Date: Tue, 28 Feb 2017 17:38:10 -0300 Subject: [PATCH] DDG SE Fixed | Corrigido MB DDG Fixed troubles with DuckDuckGo search engine. PT Corrigido conflitos com o motor de busca DuckDuckGo. --- Chrome/safeIt.js | 7 ++++--- Firefox/safeIt.js | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Chrome/safeIt.js b/Chrome/safeIt.js index 068ef50..e1ea148 100644 --- a/Chrome/safeIt.js +++ b/Chrome/safeIt.js @@ -1,8 +1,8 @@ /*----------------------------------------------------------------------------------- Author: Mauro Mascarenhas Organization link: https://www.nintersoft.com/ - Last update: 21/01/2017 - Version: 1.0 + Last update: 28/02/2017 + Version: 1.1.6 -----------------------------------------------------------------------------------*/ //------------------------------------ LISTENER ------------------------------------- @@ -23,6 +23,7 @@ function chooseSafe(requestDetails){ var pBing = new RegExp(".bing."); var pYahoo = new RegExp("search.yahoo.com"); var pYandex = new RegExp("yandex."); + var pSearchDDG = new RegExp("q="); var pDDG = new RegExp("duckduckgo."); var pSearch = new RegExp("/search"); var gSearch = new RegExp("/webhp"); @@ -56,7 +57,7 @@ function chooseSafe(requestDetails){ canReload = true; urlTemp = safeIt(URL, 'fyandex', '1'); } - else if (pDDG.test(URL)){ + else if (pSearchDDG.test(URL) && pDDG.test(URL)){ canReload = true; urlTemp = safeIt(URL, 'kp', '1'); } diff --git a/Firefox/safeIt.js b/Firefox/safeIt.js index 096fb81..d8dfcba 100644 --- a/Firefox/safeIt.js +++ b/Firefox/safeIt.js @@ -1,8 +1,8 @@ /*----------------------------------------------------------------------------------- Author: Mauro Mascarenhas Organization link: https://www.nintersoft.com/ - Last update: 21/01/2017 - Version: 1.0 + Last update: 28/02/2017 + Version: 1.1.6 -----------------------------------------------------------------------------------*/ //------------------------------------ LISTENER ------------------------------------- @@ -24,6 +24,7 @@ function chooseSafe(requestDetails){ var pYahoo = new RegExp("search.yahoo.com"); var pYandex = new RegExp("yandex."); var pDDG = new RegExp("duckduckgo."); + var pSearchDDG = new RegExp("q="); var pSearch = new RegExp("/search"); var urlTemp; @@ -46,7 +47,7 @@ function chooseSafe(requestDetails){ canReload = true; urlTemp = safeIt(URL, 'fyandex', '1'); } - else if (pDDG.test(URL)){ + else if (pSearchDDG.test(URL) && pDDG.test(URL)){ canReload = true; urlTemp = safeIt(URL, 'kp', '1'); }