Skip to content

Commit

Permalink
prefer backend fetch in most cases
Browse files Browse the repository at this point in the history
  • Loading branch information
StigNygaard committed Feb 25, 2024
1 parent 9c4978d commit d96f3a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WebExtension/contentscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@

context.debug(' *** fetchMode: ' + imgrequest.fetchMode + ' ***');

// TODO: If file: or blob:, always do frontend fetch !?!
if (imgrequest.fetchMode === 'devFrontendFetch' || imgrequest.fetchMode === 'devAutoFetch' && context.isFirefox()) { // Do frontend fetch...
if ( imgrequest.fetchMode === 'devFrontendFetch' ||
imgrequest.fetchMode === 'devAutoFetch' && (propertiesObj.URL.startsWith('blob:') || propertiesObj.URL.startsWith('file:')) ) { // Do frontend fetch...
if (imgrequest.fetchMode !== 'devAutoFetch') {
console.warn(`xIFr: Forced FRONTEND fetch (${imgrequest.fetchMode})`);
}
Expand Down

0 comments on commit d96f3a8

Please sign in to comment.