将弹出窗格添加到crossrider加载项图标,并将闪烁图标添加到加载项图标
我想将我现有的firefox和chrome插件迁移到crossrider,以便将其与safari和IE一起使用,但我怀疑mayble Schlomo(或任何crossrider开发者)能否帮助我解决这些问题 问题:将弹出窗格添加到crossrider加载项图标,并将闪烁图标添加到加载项图标,crossrider,Crossrider,我想将我现有的firefox和chrome插件迁移到crossrider,以便将其与safari和IE一起使用,但我怀疑mayble Schlomo(或任何crossrider开发者)能否帮助我解决这些问题 问题: 当有人单击显示其中某些选项的加载项按钮时,我可以添加一个弹出窗格吗 我可以在实际图标上添加一个闪烁的图标来显示发生的事件,比如聊天之类的吗 有没有办法在图标右下角添加类似于chrome的红色文本框 非常感谢 当你提出这样的问题时,我只希望下面的回答能减轻你的疑虑并给你启发:) 首先,
非常感谢 当你提出这样的问题时,我只希望下面的回答能减轻你的疑虑并给你启发:) 首先,我建议您熟悉一般情况和具体情况 在回答您的具体问题时:
appAPI.ready(function() {
var sid, // Blink interval id
alt=0, // Blink alternation state
icon = { // Blink icons
0: 'icons/icon0.png',
1: 'icons/icon1.png'
};
// Set the initial icon for the button
appAPI.browserAction.setResourceIcon(icon[0]);
// Sets the popup for the button
appAPI.browserAction.setPopup({
resourcePath:'html/popup.html',
height: 300,
width: 300
});
if (true) { // blink condition, set to true for this example
// Blink icon
sid = appAPI.setInterval(function() {
alt = 1 - alt;
appAPI.browserAction.setResourceIcon(icon[alt]);
}, 1 * 1000);
} else {
appAPI.clearInterval(sid);
}
if (true) { // show button text condition, set to true for this example
// Add red text box to icon
appAPI.browserAction.setBadgeText('ext', [255,0,0,255]);
}
});
[披露:我是一名交叉骑手员工]