Skip to content

Commit 36db7f8

Browse files
committed
Block media elements unconditionally when max size is set to 0
Related feedback: https://old.reddit.com/r/uBlockOrigin/comments/1h7x9nj/
1 parent b3a51d0 commit 36db7f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/js/pagestore.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,9 @@ const PageStore = class {
10631063
this.largeMediaTimer.on(500);
10641064
}
10651065
const size = headers.contentLength;
1066-
if ( isNaN(size) ) { return 0; }
1066+
if ( isNaN(size) ) {
1067+
return µb.userSettings.largeMediaSize === 0 ? 1 : 0;
1068+
}
10671069
if ( (size >>> 10) < µb.userSettings.largeMediaSize ) { return 0; }
10681070
this.largeMediaCount += 1;
10691071
this.largeMediaTimer.on(500);

0 commit comments

Comments
 (0)