当用新的标签页替换插件打开一个新的标签时,如何保持地址栏清晰? [英] When opening a new tab with a new tab page replacement add-on, how to keep the address bar clear?
本文介绍了当用新的标签页替换插件打开一个新的标签时,如何保持地址栏清晰?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
资源:// firefox_p-at-getblog-dot-com / getblog_buttons_page / data / newtab.html
如何使地址栏变空?
解决方案
现在,您有几个选择:
- 覆盖/注入
browser.xul
,只需将您的加载项URI添加到gInitialPages
或者将about模块和gInitialPages
东西结合在一起。 - @canuckistani建议。虽然这将仍然显示一个URI,这将是一个更好的。 ;)
- 或者,作为最后的手段,
override
about:newTab
。这可以(将?)有副作用,但是,像其他附加组件仍然覆盖about:newTab
现在恰好是您的附加组件的新页面,这可能或可能不工作和/或打破东西。
I'm developing a new tab page replacement add-on for Firefox. After it's installed, when I click the new tab icon to open a new tab, the new tab opens fine, but the address bar shows a messy URL: resource://firefox_p-at-getblog-dot-com/getblog_buttons_page/data/newtab.html
How do I make the address bar empty?
解决方案
There are only a few pages that will have "blank" uris in the URI bar.
Now, you have a couple of options:
- Overlay/inject into
browser.xul
and just add your add-on URI togInitialPages
Or combine the about module andgInitialPages
stuff. - Implement an about module like @canuckistani suggests. While this will still display an URI, it will be a much nicer one. ;)
- Or, as a last resort,
override
about:newTab
. This can (will?) have side-effects, however, like other add-ons still overlayingabout:newTab
which now happens to be the new page from your add-on, which might or might not work at all and/or break stuff.
这篇关于当用新的标签页替换插件打开一个新的标签时,如何保持地址栏清晰?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文