page-assist icon indicating copy to clipboard operation
page-assist copied to clipboard

Changing the font size?

Open n4ze3m opened this issue 1 year ago • 5 comments

Discussed in https://github.com/n4ze3m/page-assist/discussions/54

Originally posted by gerroon April 30, 2024 Is it possible to change the font size in the side bar? It is quite large compared to the font sizes in the web sites pages.

n4ze3m avatar Apr 30 '24 15:04 n4ze3m

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.

GreyTeddy avatar May 14 '24 11:05 GreyTeddy

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. image

GreyTeddy avatar May 14 '24 22:05 GreyTeddy

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.

GreyTeddy avatar May 14 '24 22:05 GreyTeddy

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

GreyTeddy avatar May 14 '24 23:05 GreyTeddy

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'.

n4ze3m avatar May 15 '24 03:05 n4ze3m