• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    Zoom level API?

    Opera add-ons
    3
    5
    3164
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • nekomajin
      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.

      Reply Quote 0
        1 Reply Last reply
      • sgunhouse
        sgunhouse Moderator Volunteer last edited by

        And if the user is zooming in to read the tooltip? Your content should probably zoom in with the page it is in, though zooming out (below 100%) might be a different matter. Just pointing it out, as of course I'm not a developer.

        Reply Quote 0
          1 Reply Last reply
        • nekomajin
          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.

          Reply Quote 0
            1 Reply Last reply
          • andreasbovens
            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.

            Reply Quote 0
              1 Reply Last reply
            • nekomajin
              nekomajin last edited by

              Great, thanks!

              Reply Quote 0
                1 Reply Last reply
              • First post
                Last post

              Computer browsers

              • Opera for Windows
              • Opera for Mac
              • Opera for Linux
              • Opera beta version
              • Opera USB

              Mobile browsers

              • Opera for Android
              • Opera Mini
              • Opera Touch
              • Opera for basic phones

              • Add-ons
              • Opera account
              • Wallpapers
              • Opera Ads

              • Help & support
              • Opera blogs
              • Opera forums
              • Dev.Opera

              • Security
              • Privacy
              • Cookies Policy
              • EULA
              • Terms of Service

              • About Opera
              • Press info
              • Jobs
              • Investors
              • Become a partner
              • Contact us

              Follow Opera

              • Opera - Facebook
              • Opera - Twitter
              • Opera - YouTube
              • Opera - LinkedIn
              • Opera - Instagram

              © Opera Software 1995-