Skip to content

Commit

Permalink
Block media elements unconditionally when max size is set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Dec 6, 2024
1 parent b3a51d0 commit 36db7f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/pagestore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,9 @@ const PageStore = class {
this.largeMediaTimer.on(500);
}
const size = headers.contentLength;
if ( isNaN(size) ) { return 0; }
if ( isNaN(size) ) {
return µb.userSettings.largeMediaSize === 0 ? 1 : 0;
}
if ( (size >>> 10) < µb.userSettings.largeMediaSize ) { return 0; }
this.largeMediaCount += 1;
this.largeMediaTimer.on(500);
Expand Down

0 comments on commit 36db7f8

Please sign in to comment.