如何在Firefox的应用程序选项卡上添加通知? [英] How to add a notification on the app tab of the Firefox?
问题描述
FF4提供了一个应用程序选项卡功能,当新的邮件或推文进入应用程序选项卡看起来像垃圾更轻时,Gmail和Twitter看起来都有一些通知代码。
有没有人知道如何使用通知操作应用程序选项卡?
我可以看到具有类似功能的IE9的固定应用程序的代码。但是我无法遇到FF的任何文件。
The FF4 delivers an app tab feature and it looks like both Gmail and Twitter have some notification code when a new mail or tweet come the app tab would look like a litter lighter. Does any know how to operate the app tab with the notification? I can see the code of a pinned application of IE9 with similar function. But I could not run into any document of FF.
推荐答案
你的意思是说你正在建立一个网站而你想要当标签被固定时,让Firefox通知用户一个事件?
Do you mean that you're building a website and you want to let Firefox notify the user on an event when the tab is pinned?
我很确定当网站的< title>
已更改。例如在Twitter上,当有新的推文时,标题从Twitter / Home变为(1)Twitter / Home。 Firefox会注意到这一点并通知用户。
I'm fairly certain Firefox does it when the website's <title>
is changed. For instance on Twitter, when there's a new tweet, the title is changed from "Twitter / Home" to "(1) Twitter / Home". Firefox notices this and notifies the user.
所以,任何更改< title>
的javascript函数都会生成它有效。
So really, any javascript function that changes <title>
will make it work.
我希望有帮助
这篇关于如何在Firefox的应用程序选项卡上添加通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!