Code Monkey home page Code Monkey logo

Comments (3)

jamielinux avatar jamielinux commented on June 3, 2024

Hi @OJFord, thanks for the bug report!

Short answer

Per-site zoom levels are respected, with one exception: a zoom level of 100% is always overridden after you navigate or reload.

There's a limitation in the WebExtension API. Other add-ons solve that by storing its own database of per-site zoom level entries for every website you visit. This add-on avoids that by only zooming when the zoom of the current tab is 100%.

Long answer

Firefox stores site-specific zoom levels in a database. Unfortunately, the WebExtension API doesn't really let you read/manipulate this database or how zoom levels are added.

If you've set default-zoom to X%, when you navigate to a website the add-on will check the current zoom level and do this:

  • If the current zoom is 100%, this is probably a new website. Change the zoom level to X%.
  • If the current zoom is anything else (eg, X% or 150%) then it's site-specific. Do nothing.

Unfortunately, when the current zoom is 100%, there's not an easy way to tell if this is a new website or whether the user has intentionally set the zoom to 100% (like in your case).

Most of the other zoom add-ons solve that by creating their own database to store per-site zoom level entries for every website you visit (essentially duplicating the functionality that Firefox is already doing). That's a perfectly reasonable approach.

To keep this add-on minimal I went for a different approach, with the caveat that it's then no longer possible to save a site-specific zoom-level of 100%. This is an acceptable trade-off for users with HiDPI screens or accessibility needs where 100% is likely to always be too small (which are the main audience for this add-on). I readily admit it doesn't suit users like yourself that want a default of below 100%. Unfortunately, I don't know a good way of accommodating for your use-case without changing the minimalist approach to this add-on, so I can only suggest you explore some of the other zoom add-ons. Sorry!

from default-zoom.

OJFord avatar OJFord commented on June 3, 2024

My default was 80%, and it was 90% I changed to that was not persisted.

from default-zoom.

jamielinux avatar jamielinux commented on June 3, 2024

My default was 80%, and it was 90% I changed to that was not persisted.

In your original post, you used 100% as an example. It happens by design in the case of 100% (as described above). In the case of 90% or anything else, I don't think that should happen. I tried to reproduce as follows:

  1. Set default to 80%
  2. Go to https://en.wikipedia.org/wiki/Firefox
  3. Change current zoom to 90%
  4. Go to https://en.wikipedia.org/wiki/Firefox#History
  5. Zoom stays at 90%

If you're able to provide some steps to reproduce your issue then I'll gladly try to reproduce myself!

from default-zoom.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.