简体   繁体   English

如何使用currentURI获取Firefox浏览器的活动选项卡URL

[英]How to use currentURI to get active tab url of firefox browser

I am looking for to fetch current tab (loaded or blank ) URL of Firefox browser. 我正在寻找获取Firefox浏览器的当前标签页(已加载或空白)的URL。 How to acheive this ? 如何做到这一点? using currentURI property in javascript. 在javascript中使用currentURI属性。

Thanks a lot, 非常感谢,

-Pravin -普拉文

Is your code running inside an addon? 您的代码是否在插件中运行? You could use: gBrowser.currentURI.spec 您可以使用: gBrowser.currentURI.spec

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Firefox WebExtension API:如何转到活动选项卡中的 url? - Firefox WebExtension API: how to go to url in active tab? 如何在Linux / Mac / Windows上的节点/电子应用程序中获取浏览器活动标签URL? - How to get browser active tab URL in node/electron app on Linux/Mac/Windows? 如何获取当前firefox选项卡的URL - How to get the URL of the current firefox tab 如何获取Node.js中的活动标签url? - How to get the active tab url in Node js? 如何使用 JS 获得活动标签 URL? - how to get active tab URL using JS? Safari浏览器如何获取标签对象而不是活动的标签对象? - How to get tab object not a active tab object for safari browser? 如何从XUL中运行的脚本中的当前活动浏览器窗口/选项卡获取URL <browser> (例如,在边栏中) - How to get URL from current active Browser window/tab from within a script running in an XUL <browser> (e.g. in a sidebar) 在javascript中识别firefox浏览器的选定选项卡URL - Identify selected tab URL of firefox browser in javascript 如何在新的浏览器选项卡中检测URL更改并取回URL? - How to detect url change in a new browser tab and get back the url? 如何获取活动标签 ID 以便能够在 javascript 中使用它 - how to get the active tab id to be able to use it in javascript
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM