Firefox 扩展:检测地址栏中的 URL 已被用户显式更改
有一种方法可以使用以下方法在 Firefox 窗口中获取 URL 更改的通知: https://developer.mozilla.org/en/Code_snippets/Progress_Listeners#Example.3a_Notification_when_the_value_in_Address_Bar_changes
不幸的是,这种方法太常见了。当用户通过单击链接、使用后退/前进按钮或在地址栏中键入地址等导航到另一个页面时,它会发出通知。
我可以仅检测在地址栏中明确键入的那些更改吗?
谢谢!
There's a way to get a notification of URL change in a Firefox window using: https://developer.mozilla.org/en/Code_snippets/Progress_Listeners#Example.3a_Notification_when_the_value_in_Address_Bar_changes
Unfortunately, this method is too much common. It informs when user navigates to another page either by clicking a link, or by using the back/forward button, or by typing an address in the location bar, etc.
Can I detect only those changes that were typed in the address bar explicitly?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能应该处理 gURLBar 上的 textentered 事件。
You should probably handle the textentered event on gURLBar.