mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
expand very simple func in-place
This commit is contained in:
parent
6bca38d4dd
commit
cf135fa736
1 changed files with 5 additions and 12 deletions
|
|
@ -457,7 +457,11 @@ FilterContainer.prototype.add = function(s) {
|
|||
if ( hostname.charAt(0) !== '~' ) {
|
||||
applyGlobally = false;
|
||||
}
|
||||
this.addSpecificSelector(hostname, parsed);
|
||||
if ( hostname.slice(-2) === '.*' ) {
|
||||
this.addEntitySelector(hostname, parsed);
|
||||
} else {
|
||||
this.addHostnameSelector(hostname, parsed);
|
||||
}
|
||||
}
|
||||
if ( applyGlobally ) {
|
||||
this.addGenericSelector(parsed);
|
||||
|
|
@ -490,17 +494,6 @@ FilterContainer.prototype.addGenericSelector = function(parsed) {
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
FilterContainer.prototype.addSpecificSelector = function(hostname, parsed) {
|
||||
// rhill 2014-07-13: new filter class: entity.
|
||||
if ( hostname.slice(-2) === '.*' ) {
|
||||
this.addEntitySelector(hostname, parsed);
|
||||
} else {
|
||||
this.addHostnameSelector(hostname, parsed);
|
||||
}
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
FilterContainer.prototype.addHostnameSelector = function(hostname, parsed) {
|
||||
// https://github.com/gorhill/uBlock/issues/145
|
||||
var unhide = parsed.unhide;
|
||||
|
|
|
|||
Loading…
Reference in a new issue