Increase font size on any website

I’m trying to create a browser extension that allows users to change the font size on any given page. I’ve already researched increasing font-sizes using JavaScript, and it always says to add stuff like ‘font-size: 2em;’ to the body style. This works, however it doesn’t work for every website.

I’m hoping I can do something similar to the ‘Bigger Text’ button like shown here.

https://userway.org/

(Click on the icon in the top right corner)

Any pointers or suggestions would be greatly appreciated.

Thank you.
Todd