1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00
This commit is contained in:
gorhill 2017-10-09 09:28:28 -04:00
parent 8c33720d16
commit 0c1207bd7a
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 36 additions and 2 deletions

View File

@ -120,8 +120,8 @@ var µBlock = (function() { // jshint ignore:line
// read-only
systemSettings: {
compiledMagic: 'yfmwhprwlqes',
selfieMagic: 'yfmwhprwlqes'
compiledMagic: 'dhmexnfqwlom',
selfieMagic: 'dhmexnfqwlom'
},
restoreBackupSettings: {

View File

@ -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 ) {