Resources used in packaged applications need to be loaded. Since our extension is not a web server, it cannot serve up resources from http:// urls. Instead, we need to detect when an image src attribute is changed and fetch the torrent then replace the URL with a blob.
This will handle edge-cases, where resources are loaded / added by scripts and not referenced in static HTML.
To supplement this, we can pre-process HTML and CSS files, replacing image references with blobs. This would mean most cases would load without requiring the DOM mutation observer.
Resources used in packaged applications need to be loaded. Since our extension is not a web server, it cannot serve up resources from http:// urls. Instead, we need to detect when an image src attribute is changed and fetch the torrent then replace the URL with a blob.
This will handle edge-cases, where resources are loaded / added by scripts and not referenced in static HTML.
To supplement this, we can pre-process HTML and CSS files, replacing image references with blobs. This would mean most cases would load without requiring the DOM mutation observer.
https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver