diff --git a/manifest.json b/manifest.json
index c6517f1..9c6e393 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "TrackMeNot",
"description": "TMN WebExtension portage",
- "version": "0.10.10",
+ "version": "0.10.11",
"background": {
"scripts": [
"trackmenot.js"
diff --git a/option-script.js b/option-script.js
index 1788e06..34864a0 100644
--- a/option-script.js
+++ b/option-script.js
@@ -122,7 +122,7 @@ function TMNClearLogs() {
function TMNShowLog() {
let logs = tmn._getLogs();
- let htmlStr = '
';
+ let htmlStr = '';
htmlStr += '';
htmlStr += 'Engine | ';
htmlStr += 'Mode | ';
@@ -167,7 +167,7 @@ function TMNShowEngines(engines) {
function TMNShowQueries() {
let sources = tmn._getAllQueries();
let htmlStr = 'Userlist | DHS | RSS | Popular | Extracted';
- htmlStr += '';
+ htmlStr += '';
let default_options = tmn._getOptions();
if ( sources.userlist ) {
diff --git a/package.json b/package.json
index 4025335..eb9d61d 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,7 @@
"fullName" : "TrackMeNot",
"license": "GPL 2.0",
"author": "Daniel Howe, Helen Nissenbaum, Vincent Toubiana",
- "version": "0.10.10",
+ "version": "0.10.11",
"homepage": "http://www.cs.nyu.edu/trackmenot/",
"icon":"data/images/skin/tmn.png",
"main": "trackmenot",
diff --git a/trackmenot.js b/trackmenot.js
index 9fc26c9..ea93bac 100644
--- a/trackmenot.js
+++ b/trackmenot.js
@@ -533,17 +533,19 @@ TRACKMENOT.TMNSearch = function() {
// Parse the HTML into phrases
let l = html.split(/((<\?tr>)|(
)|(<\/?p>))/i);
for (let i = 0; i < l.length; i++) {
- if (!l[i] || l[i] == 'undefined') continue;
- l[i] = l[i].replace(/(<([^>]+)>)/ig, ' ');
- //if (/([a-z]+ [a-z]+)/i.test(l[i])) {
- //let reg = /([a-z]{4,} [a-z]{4,} [a-z]{4,} ([a-z]{4,} ?) {0,3})/i;
- let matches = l[i].split(' ');//reg.exec(l[i]);
- if (!matches || matches.length < 2)
+ if (!l[i] || l[i] == 'undefined')
continue;
- let newQuery = trim(matches[1]);
- // if ( phrases.length >0 ) newQuery.unshift(" ");
- if (newQuery && phrases.indexOf(newQuery) < 0)
- phrases.push(newQuery);
+ l[i] = l[i].replace(/(<([^>]+)>)/ig, ' ');
+ if (/([a-z]+ [a-z]+)/i.test(l[i])) {
+ let reg = /([a-z]{4,} [a-z]{4,} [a-z]{4,} ([a-z]{4,} ?) {0,3})/i;
+ let matches = l[i].split(' ');//reg.exec(l[i]);
+ if (!matches || matches.length < 2)
+ continue;
+ let newQuery = trim(matches[1]);
+ // if ( phrases.length >0 ) newQuery.unshift(" ");
+ if (newQuery && phrases.indexOf(newQuery) < 0)
+ phrases.push(newQuery);
+ }
}
const queryToAdd = phrases.join(' ');
@@ -951,7 +953,8 @@ TRACKMENOT.TMNSearch = function() {
}
function scheduleNextSearch(delay) {
- if (!enabled) return;
+ if (!enabled)
+ return;
if (delay > 0) {
if (!isBursting()) { // randomize to approach target frequency
let offset = delay * (Math.random() / 2);
@@ -960,8 +963,10 @@ TRACKMENOT.TMNSearch = function() {
delay += delay * (Math.random() - 0.5);
}
}
- if (isBursting()) engine = burstEngine;
- else engine = chooseEngine(searchEngines.split(','));
+ if (isBursting())
+ engine = burstEngine;
+ else
+ engine = chooseEngine(searchEngines.split(','));
debug('NextSearchScheduled on: ' + engine);
tmn_errTimeout = window.setTimeout(rescheduleOnError, delay * 3);
tmn_searchTimer = window.setTimeout(doSearch, delay);