在 Firefox 中打开一个新选项卡并将 ff 保留在后台
有没有一种方法可以在 Firefox 中以编程方式在新选项卡中打开 URL,而无需 Firefox 获得焦点?
到目前为止我发现的是:
firefox -new-window
让 ff 留在后台,但打开一个新窗口而不是选项卡。firefox -new-tab
打开在新选项卡中,但将焦点放在 ff 上。
编辑:我想要完成的是让claws mail中的提要阅读器插件在后台在firefox中打开内容,这样我就可以浏览我的提要并打开我感兴趣的所有内容,并实际阅读之后的所有内容。 哦,我可能应该提到,仅 linux/gnome 的解决方案也可以。
Is the a way to programmatically open a URL in a new tab in firefox without firefox gaining focus?
What I found out so far:
firefox -new-window <URL>
lets ff stay in the background, but opens a new window instead of a tab.firefox -new-tab <URL>
opens <URL> in a new tab but gives focus to ff.
EDIT: What I'm trying to accomplish is making the feed reader plugin in claws mail open stuff in firefox in the background, so that I can go through my feeds and open everything that interests me and actually read all the stuff after that.
Oh and I should probably mention that a linux/gnome-only solution would be fine, too.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您在
about:config
中将browser.tabs.loadDivertedInBackground
设置为true
,则-new-tab
将打开选项卡在后台并且不聚焦窗口。 这超出了您(或我)想要的功能,但也许它是适合您的解决方法?If you set
browser.tabs.loadDivertedInBackground
totrue
inabout:config
then-new-tab
will open tabs in the background and not focus the window. This does more than you (or I) want but perhaps it is a suitable work-around for you?我相信你可以设置你的火狐浏览器在后台打开新标签。 如果您以编程方式打开新选项卡,它可能会在后台打开它。 如果有什么可能值得尝试。
I believe you can set your firefox to open new tabs in the background. If you programatically open a new tab it might open it in the background. If anything it might be worth trying.
您找到了新的选项卡参数,因此您只是错过了焦点。
我认为这应该依赖于窗口管理器。 这不是firefox本身负责的事情。 如果有一个尖锐的点击工具来调整metacity 的方式,那么我不知道它。
You found the new tab parameter, so you're just missing the focus thing.
That ought to be window manager-dependent I think. Isn't something firefox itself is responsible for. If there's a pointy clicky tool to tune the way metacity does that then I'm unaware of it.