Skip to content

Commit

Permalink
DDG SE Fixed | Corrigido MB DDG
Browse files Browse the repository at this point in the history
Fixed troubles with DuckDuckGo search engine.

PT

Corrigido conflitos com o motor de busca DuckDuckGo.
  • Loading branch information
mauromascarenhas committed Feb 28, 2017
1 parent 74e8233 commit 37a8100
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions Chrome/safeIt.js
Original file line number Diff line number Diff line change
@@ -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 -------------------------------------
Expand All @@ -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");
Expand Down Expand Up @@ -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');
}
Expand Down
7 changes: 4 additions & 3 deletions Firefox/safeIt.js
Original file line number Diff line number Diff line change
@@ -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 -------------------------------------
Expand All @@ -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;

Expand All @@ -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');
}
Expand Down

0 comments on commit 37a8100

Please sign in to comment.