[BUG] Background image that should be blocked by uBO is appearing
See original GitHub issueBug Report
Describe the bug
I honestly am not sure at this point what is going on here. On the surface, it appears that Dark Reader is showing an image that should have been blocked by uBlock Origin. This needs more investigation to determine what is going on.
I’ve seen this issue before, but it was not easy to replicate. Finally, I’ve found a place where I can easily replicate it. See STR.
Steps to reproduce
- Install uBlock Origin (uBO) v1.34.0 in Firefox
- Install Dark Reader v4.9.31 in Firefox
- Enable Dark Reader v5 beta mode in v4.9.31 and be sure Dynamic dark mode is enabled
- Go to https://sourceforge.net/
- Notice the background image that looks like this:
- Add uBO filter:
||fsdn.com/con/$important
and save filters in uBO - Go back to the Firefox tab with https://sourceforge.net/
- Hold down the
Shift
key, and press Firefox’s refresh button to refresh the page while bypassing the browser’s cache - Notice that the background mentioned above is still present
- Use Dark Reader’s drop-down menu to disable Dark Reader
- Notice that the background mentioned above disappears
- Use Dark Reader’s drop-down menu to re-enable Dark Reader
- Notice that the background mentioned above re-appears
Expected behavior
The background image to no longer appear regardless of whether or not Dark Reader is enabled.
Actual behavior
The background image only appears when Dark Reader is enabled.
Screenshots
System Information
- OS: Windows
- Browser: Firefox 87.0
- Dark Reader Version: v4.9.31
Additional context
Normally, this would just be a simple case of using the Dynamic Theme Editor to tweak the dynamic theme. But in this case, I don’t currently understand why the background image is being shown at all given that it should be blocked by uBO. It’s like Dark Reader is bypassing uBO filtering, but this requires further investigation before that conclusion can be made.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (9 by maintainers)
Top GitHub Comments
Ah, thanks for the suggestion. Will have a PR for this up soon.
Dark Reader could use a listener on
webRequest.onErrorOccurred
to find out which resources should not be fetched.Regardless of uBO, it would be best that DR respects the blocking of resources from content blockers.