Growl 通知:如何从网站推送 Growl 通知?
我想知道如何将桌面 Growl 通知从我的 Web 应用程序推送给我的 Web 应用程序的用户。如果可能的话,我想使用 javascript,否则像 Ruby 或 PHP 这样的语言将是我的第二选择。
您以前实施过类似的事情吗?怎么办呢?
I'm wondering how I can push desktop Growl notifications from my web application to the user of my web application. I would like to use javascript, if possible, otherwise a language like Ruby or PHP would be my second choice.
Have you implemented something like this before? How can it be done?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我弄清楚了如何使用 Ruby 推送 Growl 通知。我仍然想找到一个 JavaScript 解决方案,但如果无法使用 JavaScript,那么这里有一个 Ruby 解决方案:
使用
ruby-growl
gem:然后在您的 Ruby 脚本中:
另外,在为了使其工作,您必须在 Growl 首选项窗格的网络选项卡上启用“监听传入通知”和“允许远程应用程序注册”
I figured out how to use Ruby to push Growl notifications. I would still like to find a JavaScript solution, but if there is no way to use JavaScript, then here is a Ruby solution:
Use the
ruby-growl
gem:Then in your Ruby script:
Also, in order for this to work, you have to enable "Listen for incoming notifications" and "Allow remote application registration" on the Network tab of the Growl Preference Pane
您可以从 Javascript 发送 Growl 通知(使用一点 Flash 作为帮助,但这部分是在幕后)。这是一个测试页面: http://www.growlforwindows.com/gfw/examples/js/
请注意,这目前仅适用于 Windows - Mac 上 Growl 中的 Javascript/Flash 支持目前已损坏,如下所述:https://groups.google.com/forum/?fromgroups=# !topic/growl-development/BNF8tcUE1kM
You can send Growl notifications from Javascript (with a bit of Flash as a helper, but that part is behind the scenes). Here is a test page: http://www.growlforwindows.com/gfw/examples/js/
Note that this only currently works on Windows - the Javascript/Flash support in Growl on the Mac is currently broken as noted here: https://groups.google.com/forum/?fromgroups=#!topic/growl-development/BNF8tcUE1kM