开发者

How can I write a script to firefox that works with the adressbar?

I want to write a script to firefox that in the moment I start to write address in the addressbar it change the language to the one I开发者_Python百科'll choose (in the add-on).How do I do it?


Assuming that by "change the language to the one I'll choose" you mean changing the OS input language, you'd do it by:

  • Learning the basics
  • Searching for details of working with the Location bar and reviewing previous answers on this topic
  • Finally, for actually switching the input language you'll have to talk to the OS directly, there's no API in the platform for that. You could use ctypes for that if you developed for future Firefox versions; otherwise you'd have to write an XPCOM component in C++ (which is more complicated) or resort to launching an external program for that (which would probably not work well).
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜