代码之家  ›  专栏  ›  技术社区  ›  Martin Thurau

火狐扩展多行通知

  •  0
  • Martin Thurau  · 技术社区  · 15 年前

    我目前正在开发一个firefox扩展,它可以监控网络上的一些资源,并显示特定事件的通知。当前我使用“nsialertService”的方式如下:

    var alertsService = Components.classes["@mozilla.org/alerts-service;1"].getService(Components.interfaces.nsIAlertsService);
    alertsService.showAlertNotification(image , title, msg, true, "", onNotificationClicked);
    

    我想要两件事:

    1)多行通知(我有一些要显示的详细信息),是否有简单的显示方法?

    2)当用户悬停状态栏图标时,应打开一个带有一些可点击链接的弹出窗口。我怀疑我必须编写一个XUL文件,并管理弹出窗口和“手动”弹出窗口……如果有人有一些示例代码,这是可以的。

    1 回复  |  直到 15 年前
        1
  •  4
  •   sdwilsh    15 年前

    对于(1),除非您滚动自己的通知系统,否则不可能在所有平台上进行。这在Mac上“只起作用”(如果用户安装了groll),并且可以在Linux上工作。

    (2)你想看看 this page .