diff --git a/src/js/background.js b/src/js/background.js index 7c526f419..c66b06ad1 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -120,8 +120,8 @@ var µBlock = (function() { // jshint ignore:line // read-only systemSettings: { - compiledMagic: 'yfmwhprwlqes', - selfieMagic: 'yfmwhprwlqes' + compiledMagic: 'dhmexnfqwlom', + selfieMagic: 'dhmexnfqwlom' }, restoreBackupSettings: { diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index ed1c74908..2bee348bc 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -538,6 +538,38 @@ registerFilterClass(FilterPlainRightAnchored); /******************************************************************************/ +var FilterExactMatch = function(s) { + this.s = s; +}; + +FilterExactMatch.prototype.match = function(url) { + return url === this.s; +}; + +FilterExactMatch.prototype.logData = function() { + return { + raw: '|' + this.s + '|', + regex: rawToRegexStr(this.s, 0x3), + compiled: this.compile() + }; +}; + +FilterExactMatch.prototype.compile = function() { + return [ this.fid, this.s ]; +}; + +FilterExactMatch.compile = function(details) { + return [ FilterExactMatch.fid, details.f ]; +}; + +FilterExactMatch.load = function(args) { + return new FilterExactMatch(args[1]); +}; + +registerFilterClass(FilterExactMatch); + +/******************************************************************************/ + var FilterPlainHnAnchored = function(s) { this.s = s; }; @@ -2125,6 +2157,8 @@ FilterContainer.prototype.compile = function(raw, writer) { fdata = FilterPlainLeftAnchored.compile(parsed); } else if ( parsed.anchor === 0x1 ) { fdata = FilterPlainRightAnchored.compile(parsed); + } else if ( parsed.anchor === 0x3 ) { + fdata = FilterExactMatch.compile(parsed); } else if ( parsed.tokenBeg === 0 ) { fdata = FilterPlainPrefix0.compile(parsed); } else if ( parsed.tokenBeg === 1 ) {