-
-
Save MaskRay/e120923f281c40b156f8 to your computer and use it in GitHub Desktop.
新浪AlphaGo对李世乭文字直播desktop notification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
文字直播,网页载入后,打开devtools(一般是F12),在Console里输入一行js,即可获取通知。若弹出对话框提示Allow notification?选Allow。 | |
http://bn.sina.cn/video/live/index/tech/alphago?vt=4 人机围棋大战 | |
Notification.requestPermission(function() { $('section').on('DOMSubtreeModified', function() { var n = new Notification('meow', {body: $('section .chat_item p').eq(0).text().trim()}); setTimeout(function() { n.close() }, 10000) }) }) | |
http://lives.sina.cn/live/live?live_mg=sports&wm=&livetype=qipai&stype=&vt=4&match_id=l_142874 李世石VS谷歌AlphaGo 人机大战III | |
http://lives.sina.cn/live/live?live_mg=sports&wm=&livetype=qipai&stype=&vt=4&match_id=l_142961 李世石VS谷歌AlphaGo 人机大战Ⅳ | |
http://lives.sina.cn/live/live?live_mg=sports&wm=&livetype=qipai&stype=&vt=4&match_id=l_143040 李世石VS谷歌AlphaGo 人机大战V | |
var orig_increment_apply_do = window.increment_apply_do; window.increment_apply_do = function(rs) { Notification.requestPermission(function() { var n = new Notification('meow', {body: rs.data[0].content}); setTimeout(function() { n.close() }, 10000) }); return orig_increment_apply_do(rs) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这个棒。