本文介绍了当用新的标签页替换插件打开一个新的标签时,如何保持地址栏清晰?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在为Firefox开发一个新的标签页替换插件。安装后,当我点击新的标签图标打开一个新的标签,新的标签打开罚款,但地址栏显示一个凌乱的URL:资源:// firefox_p-at-getblog-dot-com / getblog_buttons_page / data / newtab.html
如何使地址栏变空?
解决方案
只有一个 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.
这篇关于当用新的标签页替换插件打开一个新的标签时,如何保持地址栏清晰?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!