
正常情况下
Webpage Icon要使用
Push Notifications要使用
window.safari.pushNotification.requestPermission
weibo.com都没使用,但Safari下这两项都工作,是什么原因?Safari内置微博的这个功能吗?
1 yyfearth 2015-02-26 04:17:44 +08:00 我觉得 Push Notifications 应该是系统支持 不是通过Safari OSX 你可以在 System Settings > Internet Accounts 里面登陆weibo iOS 也有这样支持 然后系统就会接收通知了 不开Safari也可以用 我不用weibo但是我用linkedIn 就是这样的 |
2 cuthead OP @yyfearth 我说的是Safari Push Notifications,在Safari - Preferences 下面有Notifications,是网站直接发Notifications,由Safari管理。这里有说明 https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html#//apple_ref/doc/uid/TP40013225-CH3-SW1 另外我发现block http://js2.t.sinajs.cn/t6/webim_prime/js/common/all.js?version=70309a0171c708d7 就能禁止显示这个,但我不懂Javascript,无法找到是哪段Javascript控制了弹出这个窗口 这就是我说的Safari Push Notifications |
3 yyfearth 2015-02-26 05:28:16 +08:00 @cuthead Web Notification API? https://developer.mozilla.org/en-US/docs/Web/API/Notification/Using_Web_Notifications |