1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 03:12:33 +01:00
This commit is contained in:
Raymond Hill 2018-02-26 14:08:16 -05:00
parent 2c901588c7
commit 67e06f53b4
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
uBlock Origin - a browser extension to block requests. uBlock Origin - a browser extension to block requests.
Copyright (C) 2014-2017 Raymond Hill Copyright (C) 2014-2018 Raymond Hill
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -1378,10 +1378,12 @@ var FilterParser = function() {
FilterParser.prototype.toNormalizedType = { FilterParser.prototype.toNormalizedType = {
'beacon': 'other', 'beacon': 'other',
'css': 'stylesheet',
'data': 'data', 'data': 'data',
'document': 'main_frame', 'document': 'main_frame',
'elemhide': 'generichide', 'elemhide': 'generichide',
'font': 'font', 'font': 'font',
'frame': 'sub_frame',
'genericblock': 'unsupported', 'genericblock': 'unsupported',
'generichide': 'generichide', 'generichide': 'generichide',
'image': 'image', 'image': 'image',
@ -1397,6 +1399,7 @@ FilterParser.prototype.toNormalizedType = {
'script': 'script', 'script': 'script',
'stylesheet': 'stylesheet', 'stylesheet': 'stylesheet',
'subdocument': 'sub_frame', 'subdocument': 'sub_frame',
'xhr': 'xmlhttprequest',
'xmlhttprequest': 'xmlhttprequest', 'xmlhttprequest': 'xmlhttprequest',
'webrtc': 'unsupported', 'webrtc': 'unsupported',
'websocket': 'websocket' 'websocket': 'websocket'
@ -1510,7 +1513,7 @@ FilterParser.prototype.parseOptions = function(s) {
if ( not ) { if ( not ) {
opt = opt.slice(1); opt = opt.slice(1);
} }
if ( opt === 'third-party' ) { if ( opt === 'third-party' || opt === '3p' ) {
this.parsePartyOption(false, not); this.parsePartyOption(false, not);
continue; continue;
} }
@ -1553,7 +1556,7 @@ FilterParser.prototype.parseOptions = function(s) {
this.important = Important; this.important = Important;
continue; continue;
} }
if ( opt === 'first-party' ) { if ( opt === 'first-party' || opt === '1p' ) {
this.parsePartyOption(true, not); this.parsePartyOption(true, not);
continue; continue;
} }