Add the 4chan X logo to desktop notifications.
This commit is contained in:
parent
e539c35a53
commit
43fbf62da0
@ -47,3 +47,4 @@ Favicon =
|
|||||||
|
|
||||||
empty: 'data:image/gif;base64,<%= grunt.file.read("img/favicons/empty.gif", {encoding: "base64"}) %>'
|
empty: 'data:image/gif;base64,<%= grunt.file.read("img/favicons/empty.gif", {encoding: "base64"}) %>'
|
||||||
dead: 'data:image/gif;base64,<%= grunt.file.read("img/favicons/dead.gif", {encoding: "base64"}) %>'
|
dead: 'data:image/gif;base64,<%= grunt.file.read("img/favicons/dead.gif", {encoding: "base64"}) %>'
|
||||||
|
logo: 'data:image/png;base64,<%= grunt.file.read("img/icon128.png", {encoding: "base64"}) %>'
|
||||||
|
|||||||
@ -103,6 +103,7 @@ Unread =
|
|||||||
$('.nameBlock', post.nodes.info).textContent.trim()
|
$('.nameBlock', post.nodes.info).textContent.trim()
|
||||||
notif = new Notification "#{name} replied to you.",
|
notif = new Notification "#{name} replied to you.",
|
||||||
body: post.info.comment
|
body: post.info.comment
|
||||||
|
icon: Favicon.logo
|
||||||
notif.onclick = ->
|
notif.onclick = ->
|
||||||
Header.scrollToPost post.nodes.root
|
Header.scrollToPost post.nodes.root
|
||||||
window.focus()
|
window.focus()
|
||||||
|
|||||||
@ -114,8 +114,9 @@ QR =
|
|||||||
notice = new Notice 'warning', el
|
notice = new Notice 'warning', el
|
||||||
QR.notifications.push notice
|
QR.notifications.push notice
|
||||||
return unless d.hidden
|
return unless d.hidden
|
||||||
notif = new Notification '<%= meta.name %> QR warning',
|
notif = new Notification 'Quick reply warning',
|
||||||
body: el.textContent
|
body: el.textContent
|
||||||
|
icon: Favicon.logo
|
||||||
notif.onclick = -> window.focus()
|
notif.onclick = -> window.focus()
|
||||||
notif.onclose = -> notice.close()
|
notif.onclose = -> notice.close()
|
||||||
setTimeout ->
|
setTimeout ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user