ds300 / jetzt

Speed reader extension for chrome
Other
485 stars 124 forks source link

Breaks when using dark reader extension #171

Open guacamoleRiver opened 3 years ago

guacamoleRiver commented 3 years ago

This is a great extension, but it falls short when using DarkReader.


  1. This is filter/filter+ mode It isn't so bad, but keep in mind that it goes stark and blinding white (the backdrop) when switching themes (in your extension). 1
    • The dynamic theme suffers from this same caveat.
  2. Static mode: This is horrid, and just as bad in dark mode. 2

Now, I'm communicating with the developers over at the dark-reader extension and trying to get some way for other devs to exclude elements from these filters. But that might take a while.


In the meantime, one possible solution would be to place the entire UI inside its own fixed-position fullscreen iFrame, one with a semi-transparent background, to keep the theme. You could bind the keyboard controls both inside and outside the iFrame and use extension messaging to relay control.

I say both inside and outside because forcibly setting focus to an iFrame isn't possible (to my knowledge). However, a user clicking the central part of the reader would set the focus to the iFrame.

"Wouldn't this have the same result since DarkReader can target iFrames too"? No, because you'd make it an extension page, one that for nearly every user, other extensions cannot access.


This would not be feasible for the bookmarklet distribution, but the extension is nicer anyway, wouldn't hurt to add more features :) .

guacamoleRiver commented 3 years ago

It appears as though my commit was merged, this extension still has some theming to be desired in regards to dark reader, so I'll make some overrides for this and make a PR when I have some free time. In the mean time, this is semi-solved.