Zoom level API?
-
nekomajin last edited by
For certain exensions, it would be good to get the current zoom level of the page.
For example, I have the Link Alert extension: https://addons.opera.com/extensions/details/link-alert-2/
I'd like to add an option to preserve the tooltip/icon size if the user zooms in or out.I don't know if it would be a security concern to set the zoom level via extensions, but I don't see any problem only to get it.
-
nekomajin last edited by
Your point is valid, but that's why it is called an option.
The problem is when the user zooms in, the tooltip will be bigger while the mouse cursor stays the same size, and it looks really ugly. The tooltip has only icons, so readability is not an issue, but of course there are people with eye problems, so they could uncheck it in the settings.
-
andreasbovens last edited by
This is reported as window.devicePixelRatio: go to http://andreasbovens.github.io/understanding-viewport/meta-widthdevicewidth.html and try zooming in and out. You'll see that value changes.