|
|
@ -999,16 +999,18 @@ MessengerUI, Messages) {
|
|
|
|
pads_options.unshift(h("hr"));
|
|
|
|
pads_options.unshift(h("hr"));
|
|
|
|
pads_options.unshift(allowNotif);
|
|
|
|
pads_options.unshift(allowNotif);
|
|
|
|
var $allow = $(allowNotif).click(function () {
|
|
|
|
var $allow = $(allowNotif).click(function () {
|
|
|
|
Common.getSframeChannel().event('Q_ASK_NOTIFICATION', null, function (granted) {
|
|
|
|
Common.getSframeChannel().event('Q_ASK_NOTIFICATION', null, function (e, allow) {
|
|
|
|
if (!granted) { return; }
|
|
|
|
if (!allow) { return; }
|
|
|
|
$(allowNotif).remove();
|
|
|
|
$(allowNotif).remove();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
metadataMgr.onChange(function () {
|
|
|
|
var onChange = function () {
|
|
|
|
var privateData = metadataMgr.getPrivateData();
|
|
|
|
var privateData = metadataMgr.getPrivateData();
|
|
|
|
if (!privateData.notifications) { return; }
|
|
|
|
if (!privateData.notifications) { return; }
|
|
|
|
$allow.remove();
|
|
|
|
$allow.remove();
|
|
|
|
});
|
|
|
|
metadataMgr.off('change', onChange);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
metadataMgr.onChange(onChange);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|