aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/js/reverselookup-worker.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/js/reverselookup-worker.js b/src/js/reverselookup-worker.js
index e04ce81..b82f9ea 100644
--- a/src/js/reverselookup-worker.js
+++ b/src/js/reverselookup-worker.js
@@ -103,11 +103,10 @@ var fromCosmeticFilter = function(details) {
var matches = rePlainSelector.exec(filter);
if ( matches ) {
if ( matches[0] === filter ) { // simple CSS selector
- reStr = rescape('c\vlg\v');
+ reStr = rescape('c\vlg\v' + filter);
} else { // complex CSS selector
- reStr = rescape('c\vlg+\v');
+ reStr = rescape('c\vlg+\v' + matches[0] + '\v' + filter);
}
- reStr += '\\w+' + rescape('\v' + filter);
} else if ( reHighLow.test(filter) ) { // [alt] or [title]
reStr = rescape('c\vhlg0\v' + filter);
} else if ( reHighMedium.test(filter) ) { // [href^="..."]