Mozilla VPN is currently experiencing an outage. Our team is actively working to resolve the issue. Please check the status page for real-time updates. Thank you for your patience.

Questo sito potrebbe offrire funzionalità limitate durante le operazioni di manutenzione per migliorare l'esperienza utente. Se un articolo non risolve il tuo problema e vuoi richiedere supporto, la nostra comunità di supporto è pronta ad aiutarti tramite @FirefoxSupport su Twitter e /r/firefox su Reddit.

Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Ulteriori informazioni

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

Are there some Javascript or Jquery to adjust layout.css.devPixelsPerPx?

more options

I am using Firefox 44.0.2. Everything appearing in this browser is too big comparing to Chrome and Internet Explorer. I learn layout.css.devPixelsPerPx in Firefox controls the above matter. I can manually adjust Firefox's resolution by entering 1 in css.devPixelsPerPx (the default is -1) and then everything looks smaller in Firefox browser.

I wonder if are there some Javascript or Jquery code to adjust layout.css.devPixelsPerPx? so that when end users use the application, the application will automatically adjust Firefox's dimension. Please give me a hand. Thanks

I am using Firefox 44.0.2. Everything appearing in this browser is too big comparing to Chrome and Internet Explorer. I learn layout.css.devPixelsPerPx in Firefox controls the above matter. I can manually adjust Firefox's resolution by entering 1 in css.devPixelsPerPx (the default is -1) and then everything looks smaller in Firefox browser. I wonder if are there some Javascript or Jquery code to adjust layout.css.devPixelsPerPx? so that when end users use the application, the application will automatically adjust Firefox's dimension. Please give me a hand. Thanks

Tutte le risposte (2)

more options

No, definitely not. Web pages cannot change Firefox preferences.

But pages can detect some parameters related to the user's resolution. For example, what if you knew that Firefox users see text 25% larger than the standard browser default of 96ppi? You can get that from window.devicePixelRatio (it might only exist in Firefox).

I have a couple demo pages online that you could play with to get some ideas, but neither is a complete solution:

more options

Actually, the window.devicePixelRatio is not strictly speaking an indication of the default zoom level, since the user can modify it using the zoom feature. So you may want to be careful "undoing" the zoom in case that's actually the user's preference.