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

Help with user script #13

Closed
r-a-y opened this issue Apr 21, 2019 · 2 comments
Closed

Help with user script #13

r-a-y opened this issue Apr 21, 2019 · 2 comments

Comments

@r-a-y
Copy link

r-a-y commented Apr 21, 2019

Hi xiaoxiaoflood,

I'm trying to convert an older legacy extension to a userscript:
https://addons.mozilla.org/en-US/firefox/addon/auto-focus-url-bar/

Source:
https://pastebin.com/bNpXZDN1

It appears that this script only works with e10s disabled and I'm not sure how to convert it to get it working with e10s. Some APIs probably need to replaced, but I'm not familiar enough with XUL to get it working:
https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Add-on_SDK/Guides/XUL_Migration_Guide#Using_XPCOM

Any help would be appreciated.

@xiaoxiaoflood
Copy link
Owner

Hi,

In e10s world you need to use message managers to interact with tab content.

https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Multiprocess_Firefox/Message_Manager/Message_manager_overview

Sorry, but I have no time to fix other legacy addons.

I use 'a' as hotkey to focus urlbar (with keyconfig). No Ctrl, no Shift, no Alt, just 'a', and you will still be able to type 'a' normally in text fields, as the hotkey only acts when no text field is focused. Just saying, maybe it will suit you too.

@r-a-y
Copy link
Author

r-a-y commented May 24, 2020

Thanks for the workaround with keyconfig. Just tested it and that kind of works!

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