CptFoobar / Owl

A Mozilla Firefox add-on to make online reading comfortable.
http://owl.sidhant.io
Other
63 stars 8 forks source link

Owl theme application modes #14

Open CptFoobar opened 6 years ago

CptFoobar commented 6 years ago

Currently Owl simply attached CSS stylesheets over webpages using the tabs module in WebExtensions. While this is certainly fast, it has also been the cause of multiple inconsistencies in the webpages. Obscuring popups, chat windows, inverting images set as background of HTML elements are few of those. To counter this, Owl should support two modes of theme application, Smart and Fast. The Fast mode will the current stylesheet method. Smart mode, however, would be a new method that applies CSS to elements of the page in an iteration. This would definitely be a tad slower for larger (and dynamic) pages, but would overall provide the efficiency that is expected of Owl. The mode can be selected by the user through the add-on's setting page. The mode would then be globally applicable to all tabs (no per-site setting here).

The primary challenge here would be restructuring the code (see issue #15) to accommodate the new mode and the respective changes to the CSS for the themes (including HC theme (see issue #13). It is possible that separate CSS would be needed for the two modes.