mirror of https://github.com/gorhill/uBlock.git
fix #3110
This commit is contained in:
parent
8c33720d16
commit
0c1207bd7a
|
@ -120,8 +120,8 @@ var µBlock = (function() { // jshint ignore:line
|
||||||
|
|
||||||
// read-only
|
// read-only
|
||||||
systemSettings: {
|
systemSettings: {
|
||||||
compiledMagic: 'yfmwhprwlqes',
|
compiledMagic: 'dhmexnfqwlom',
|
||||||
selfieMagic: 'yfmwhprwlqes'
|
selfieMagic: 'dhmexnfqwlom'
|
||||||
},
|
},
|
||||||
|
|
||||||
restoreBackupSettings: {
|
restoreBackupSettings: {
|
||||||
|
|
|
@ -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) {
|
var FilterPlainHnAnchored = function(s) {
|
||||||
this.s = s;
|
this.s = s;
|
||||||
};
|
};
|
||||||
|
@ -2125,6 +2157,8 @@ FilterContainer.prototype.compile = function(raw, writer) {
|
||||||
fdata = FilterPlainLeftAnchored.compile(parsed);
|
fdata = FilterPlainLeftAnchored.compile(parsed);
|
||||||
} else if ( parsed.anchor === 0x1 ) {
|
} else if ( parsed.anchor === 0x1 ) {
|
||||||
fdata = FilterPlainRightAnchored.compile(parsed);
|
fdata = FilterPlainRightAnchored.compile(parsed);
|
||||||
|
} else if ( parsed.anchor === 0x3 ) {
|
||||||
|
fdata = FilterExactMatch.compile(parsed);
|
||||||
} else if ( parsed.tokenBeg === 0 ) {
|
} else if ( parsed.tokenBeg === 0 ) {
|
||||||
fdata = FilterPlainPrefix0.compile(parsed);
|
fdata = FilterPlainPrefix0.compile(parsed);
|
||||||
} else if ( parsed.tokenBeg === 1 ) {
|
} else if ( parsed.tokenBeg === 1 ) {
|
||||||
|
|
Loading…
Reference in New Issue