Open n4ze3m opened 4 months ago
A perhaps easy fix would be to link the zoom "style" functionality to buttons - and +. The zoom can be easily changed by running document.body.style.zoom = 0.5
in the console for a 50% zoom out. Of course, buttons would be a proper solution to this.
I can make a PR with this change, if I have some free time.
Sadly, it looks like the zoom "style" functionality is not yet supported by Mozilla Firefox yet. As this extension is available there as well, it will be much more involved to add zoom functionality.
Which is extra sad, because I managed to quickly do a prototype, and it actually works well on Google Chrome 😅...
EDIT: It just got support today??? hahaha, it was in preview when I first wrote this and my local firefox does not support it.
Given that it just got support (and I updated my local Firefox), I will still make a PR, and it can be decided later whether to be merged.
Typescript type CSSStyleDeclaration
doesn't include zoom yet (left a comment)., but should work now, as I'll put a //@ts-ignore
Also, from my testing, it looks like Ctrl + Scroll Up/Down zooms in/out the side page! But only on Firefox, not Chrome. So I'm thinking adding a setting in the Settings page
Hey, this is so cool ❤️! Btw, you can check which environment the extension is in using import.meta.env.BROWSER
. For Chromium-based browsers, it will be 'chrome', and for Firefox, it will be 'firefox'.
Discussed in https://github.com/n4ze3m/page-assist/discussions/54