Fix Desktop Notifications

This commit is contained in:
Zixaphir 2013-08-18 21:11:12 -07:00
parent fbed325076
commit cbecf966a9
3 changed files with 6 additions and 3 deletions

View File

@ -3897,7 +3897,7 @@
}); });
$.on(window, 'load hashchange', Header.hashScroll); $.on(window, 'load hashchange', Header.hashScroll);
$.on(d, 'CreateNotification', this.createNotification); $.on(d, 'CreateNotification', this.createNotification);
return $.asap((function() { $.asap((function() {
return d.body; return d.body;
}), function() { }), function() {
if (!Main.isThisPageLegit()) { if (!Main.isThisPageLegit()) {
@ -3911,6 +3911,7 @@
_this.setBarPosition(Conf['Bottom Header']); _this.setBarPosition(Conf['Bottom Header']);
return _this; return _this;
}); });
return this.enableDesktopNotifications();
}, },
bar: $.el('div', { bar: $.el('div', {
id: 'header-bar' id: 'header-bar'

View File

@ -3914,7 +3914,7 @@
}); });
$.on(window, 'load hashchange', Header.hashScroll); $.on(window, 'load hashchange', Header.hashScroll);
$.on(d, 'CreateNotification', this.createNotification); $.on(d, 'CreateNotification', this.createNotification);
return $.asap((function() { $.asap((function() {
return d.body; return d.body;
}), function() { }), function() {
if (!Main.isThisPageLegit()) { if (!Main.isThisPageLegit()) {
@ -3928,6 +3928,7 @@
_this.setBarPosition(Conf['Bottom Header']); _this.setBarPosition(Conf['Bottom Header']);
return _this; return _this;
}); });
return this.enableDesktopNotifications();
}, },
bar: $.el('div', { bar: $.el('div', {
id: 'header-bar' id: 'header-bar'

View File

@ -36,7 +36,6 @@ Header =
$.sync 'Fixed Header', Header.setBarFixed $.sync 'Fixed Header', Header.setBarFixed
$.sync 'Bottom Header', Header.setBarPosition $.sync 'Bottom Header', Header.setBarPosition
$.event 'AddMenuEntry', $.event 'AddMenuEntry',
type: 'header' type: 'header'
el: $.el 'span', el: $.el 'span',
@ -63,6 +62,8 @@ Header =
@setBarPosition Conf['Bottom Header'] @setBarPosition Conf['Bottom Header']
@ @
@enableDesktopNotifications()
bar: $.el 'div', bar: $.el 'div',
id: 'header-bar' id: 'header-bar'