tiwoc / fxdpi

One-click HiDPI mode toggle for Firefox
MIT License
4 stars 1 forks source link

Support to Webextensions #3

Open juninho opened 7 years ago

juninho commented 7 years ago

I'm using Firefox Nightly v.55 and fxdpi is shown as LEGACY.

addons.

yfdyh000 commented 7 years ago

https://wiki.mozilla.org/WebExtensions/RoadMapFirefox57#Preferences_Access

tiwoc commented 7 years ago

Thanks for the info; I wasn't aware of that issue. Maybe this can be worked around with the tabs JS API, which at least offers access to the tab's zoom level. This won't scale the browser's chrome, though.

tiwoc commented 7 years ago

As promised, I took a stab at re-implementing fxdpi as a WebExtension. In the current state of Firefox, this won't fly: I can set the zoom factor for a given tab, but it will be stored as the default zoom factor for the origin of the page. This is not viable because it interferes with the user's manual settings and builds a list of all origins that the user has visited that he can neither view nor clear.

There's an option to change the zoom scope to per-tab so that zooming would be independent of the origin, but it doesn't work yet (WebExtensions: Zoom API's in chrome.tabs don't work correctly). With this, I could switch all tabs to per-tab and set their zoom level. This zoom level, however, would be reset on navigation, which could lead to a lot of flickering.

tiwoc commented 7 years ago

I filed an API request in Mozilla's bug tracker: https://bugzilla.mozilla.org/show_bug.cgi?id=1373607

Let's see what happens.

juninho commented 6 years ago

JFYI: A global zoom option is planned for 57, in the (12 years old) bug https://bugzilla.mozilla.org/show_bug.cgi?id=332275

Source: https://www.reddit.com/r/firefox/comments/6v7r2s/a_global_zoom_option_is_planned_for_57/

tiwoc commented 6 years ago

I voted for it, thanks. This would be a good thing to have.