复制的谷歌浏览器的行动弹出效果有Firefox扩展
-
21-09-2019 - |
题
浏览器的行动提供一个非常好的弹效果的默认。
保存我的死的图像链接删除
徘徊在工具条的图标提供了一个简洁的悬停的效果。
点击的工具栏标显示了一个很好的画打开的弹出窗口html文件。
弹出与按钮被按下。
点击的工具栏标再次淡出的弹出窗口。
任何想法,在如何大致这种效果有Firefox扩展?有人成功地实现了类似的东西到这种效果吗?
谢谢。
解决方案 2
在情况下,有人正在研究这一点,并试图找出答案,最终采用一个小组内toolbarpalette在浏览器。太文件的工作很适合我。
其他提示
大家谁是刚刚开始你的第一Firefox扩展,就像我在这里是一个例子码:
yourextname\铬\内容\浏览器。太
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://yourextname/skin/toolbar.css" type="text/css"?>
<overlay id="yourextname_overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<popupset>
<menupopup id="yourextname_menu_popup">
<menuitem label="Website" oncommand="gBrowser.selectedTab = gBrowser.addTab('http://www.your-website.com/');" />
<menuseparator />
<menuitem label="Options" oncommand="window.open('chrome://yourextname/content/options.xul', 'Options', 'dialog,chrome,modal,titlebar,toolbar,centerscreen=yes');" />
</menupopup>
<panel id="yourextname_popup" noautohide="false" noautofocus="true">
<label control="vvvname" value="Name:"/><textbox id="vvvname"/>
</panel>
</popupset>
<toolbarpalette id="BrowserToolbarPalette">
<toolbarbutton id="yourextname_toolbar_button" class="toolbarbutton-1" context="yourextname_menu_popup" oncommand="document.getElementById('yourextname_popup').openPopup(document.getElementById('yourextname_toolbar_button'), 'after_start', 0, 0, false, false);" label="button name" tooltiptext="tooltip" />
</toolbarpalette>
</overlay>
yourextname\皮肤\工具栏。css
这将增加标的工具栏按钮:
#yourextname_toolbar_button {
list-style-image:url(chrome://yourextname/skin/icon_024.png);
}
toolbar[iconsize="small"] #yourextname_toolbar_button {
list-style-image:url(chrome://yourextname/skin/icon_016.png);
}
yourextname\。清单
content yourextname chrome/content/
overlay chrome://browser/content/browser.xul chrome://yourextname/content/overlay.xul
skin yourextname classic/1.0 skin/
style chrome://global/content/customizeToolbar.xul chrome://yourextname/skin/toolbar.css
注:确保你全部替换"yourextname"串与一些独特的东西,最好有你的扩展名称。
不隶属于 StackOverflow