mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
Or just simplify by combining both conditions...
This commit is contained in:
parent
37f5b3d642
commit
cd1a3d22cd
1 changed files with 4 additions and 9 deletions
|
@ -681,16 +681,11 @@ const filterToDOMInterface = (( ) => {
|
||||||
for ( const elem of elems ) {
|
for ( const elem of elems ) {
|
||||||
const srcProp = netFilter1stSources[elem.localName];
|
const srcProp = netFilter1stSources[elem.localName];
|
||||||
const src = elem[srcProp];
|
const src = elem[srcProp];
|
||||||
if ( typeof src === 'string' && reFilter.test(src) ) {
|
if (
|
||||||
out.push({
|
typeof src === 'string' &&
|
||||||
type: 'network',
|
reFilter.test(src) ||
|
||||||
elem: elem,
|
|
||||||
src: srcProp,
|
|
||||||
opts: filterTypes[elem.localName],
|
|
||||||
});
|
|
||||||
} else if (
|
|
||||||
typeof elem.currentSrc === 'string' &&
|
typeof elem.currentSrc === 'string' &&
|
||||||
reFilter.test(elem.currentSrc)
|
reFilter.test(elem.currentSrc)
|
||||||
) {
|
) {
|
||||||
out.push({
|
out.push({
|
||||||
type: 'network',
|
type: 'network',
|
||||||
|
|
Loading…
Reference in a new issue