1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 07:22:28 +02:00

support font request type

This commit is contained in:
gorhill 2015-04-05 10:38:47 -04:00
parent ccaa674a34
commit bc83836a7b
2 changed files with 4 additions and 11 deletions

View File

@ -87,7 +87,7 @@ return {
// read-only // read-only
systemSettings: { systemSettings: {
compiledMagic: 'perhodsoahya', compiledMagic: 'cjrthpvolupa',
selfieMagic: 'spqmeuaftfra' selfieMagic: 'spqmeuaftfra'
}, },

View File

@ -62,7 +62,8 @@ var typeNameToTypeValue = {
'script': 4 << 4, 'script': 4 << 4,
'xmlhttprequest': 5 << 4, 'xmlhttprequest': 5 << 4,
'sub_frame': 6 << 4, 'sub_frame': 6 << 4,
'other': 7 << 4, 'font': 7 << 4,
'other': 8 << 4,
'cosmetic-filtering': 13 << 4, 'cosmetic-filtering': 13 << 4,
'inline-script': 14 << 4, 'inline-script': 14 << 4,
'popup': 15 << 4 'popup': 15 << 4
@ -1194,8 +1195,8 @@ FilterParser.prototype.toNormalizedType = {
'script': 'script', 'script': 'script',
'xmlhttprequest': 'xmlhttprequest', 'xmlhttprequest': 'xmlhttprequest',
'subdocument': 'sub_frame', 'subdocument': 'sub_frame',
'font': 'font',
'other': 'other', 'other': 'other',
'document': 'main_frame',
'elemhide': 'cosmetic-filtering', 'elemhide': 'cosmetic-filtering',
'inline-script': 'inline-script', 'inline-script': 'inline-script',
'popup': 'popup' 'popup': 'popup'
@ -1296,14 +1297,6 @@ FilterParser.prototype.parseOptions = function(s) {
this.unsupported = true; this.unsupported = true;
break; break;
} }
if ( opt === 'document' ) {
if ( this.action === BlockAction ) {
this.parseOptType('document', false);
continue;
}
this.unsupported = true;
break;
}
if ( this.toNormalizedType.hasOwnProperty(opt) ) { if ( this.toNormalizedType.hasOwnProperty(opt) ) {
this.parseOptType(opt, not); this.parseOptType(opt, not);
continue; continue;