Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control+0 should reset to preferred zoom level instead of 100% #1

Open
DarwinAwardWinner opened this issue Mar 7, 2019 · 3 comments

Comments

@DarwinAwardWinner
Copy link

This extension correctly sets the zoom level upon loading a website, but pressing control+0 always sets the zoom level to 100%. It would be nice if this extension modified that shortcut to set the zoom level to the preferred default instead.

@jamielinux
Copy link
Owner

Hi @DarwinAwardWinner, thanks for your feature request!

I like the idea, but I'm not sure that WebExtensions allow you to override default keyboard shortcuts.

I couldn't find anything definitive. There's a bug report that seems undecided on whether it should be allowed, and there are reports of inconsistencies across platforms. But I tried it myself (with Firefox on Linux) and couldn't get Ctrl+0 to work; it only seemed to play nice when using a random shortcut Firefox wasn't already using.

A workaround is to:

  1. Enable the Browser Console command-line.
  2. Open the Browser Console.
  3. Run FullZoom._cps2.setGlobal(FullZoom.name,1.33,gBrowser.selectedBrowser.loadContext); where 1.33 is the zoom level you want Ctrl-0 to reset things to (in this case 133%).

@DarwinAwardWinner
Copy link
Author

I wonder if you could write a user script script to run this on every startup. (I assume the user would have to set it up manually, since the extension itself doesn't have the permissions.)

@jamielinux
Copy link
Owner

After you run that command, the setting persists after you close Firefox which is handy :) And as a bonus you get Ctrl+0 that does the Right Thing. The problem is, as you correctly mentioned, you can't do exactly the same with an extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants