mirror of
https://github.com/Oreolek/TrackMeNot-Chrome.git
synced 2024-05-12 14:08:19 +03:00
Fixed the out-of-scope variable
This commit is contained in:
parent
2e3cceb07c
commit
b4754e437f
|
@ -432,6 +432,7 @@ TRACKMENOT.TMNSearch = function() {
|
||||||
|
|
||||||
function checkForSearchUrl(url) {
|
function checkForSearchUrl(url) {
|
||||||
var result = null;
|
var result = null;
|
||||||
|
var id = null;
|
||||||
for (var i=0;i< engines.length; i++){
|
for (var i=0;i< engines.length; i++){
|
||||||
var eng = engines[i];
|
var eng = engines[i];
|
||||||
var regex = eng.regexmap;
|
var regex = eng.regexmap;
|
||||||
|
@ -439,21 +440,22 @@ TRACKMENOT.TMNSearch = function() {
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
cout(regex + " MATCHED! on "+eng.id );
|
cout(regex + " MATCHED! on "+eng.id );
|
||||||
|
id = eng.id;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!result)
|
if (!result)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (result.length !=4 ){
|
if (result.length !== 4 ){
|
||||||
if (result.length ==6 && eng.id == "google" ) {
|
if (result.length === 6 && id == "google" ) {
|
||||||
result.splice(2,2);
|
result.splice(2,2);
|
||||||
result.push(eng.id);
|
result.push(id);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
cout("REGEX_ERROR: "+url);
|
cout("REGEX_ERROR: "+url);
|
||||||
}
|
}
|
||||||
result.push(eng.id);
|
result.push(id);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue