mirror of https://github.com/gorhill/uBlock.git
Or just simplify by combining both conditions...
This commit is contained in:
parent
37f5b3d642
commit
cd1a3d22cd
|
@ -681,16 +681,11 @@ const filterToDOMInterface = (( ) => {
|
|||
for ( const elem of elems ) {
|
||||
const srcProp = netFilter1stSources[elem.localName];
|
||||
const src = elem[srcProp];
|
||||
if ( typeof src === 'string' && reFilter.test(src) ) {
|
||||
out.push({
|
||||
type: 'network',
|
||||
elem: elem,
|
||||
src: srcProp,
|
||||
opts: filterTypes[elem.localName],
|
||||
});
|
||||
} else if (
|
||||
if (
|
||||
typeof src === 'string' &&
|
||||
reFilter.test(src) ||
|
||||
typeof elem.currentSrc === 'string' &&
|
||||
reFilter.test(elem.currentSrc)
|
||||
reFilter.test(elem.currentSrc)
|
||||
) {
|
||||
out.push({
|
||||
type: 'network',
|
||||
|
|
Loading…
Reference in New Issue