Catch undefined Notification for IE
Notification is not defined on IE. Also it is better to put javascript in the js files. issue7683 review54341002
This commit is contained in:
@@ -93,8 +93,6 @@ this repository contains the full copyright notices and license terms. -->
|
||||
}
|
||||
}
|
||||
});
|
||||
Notification.requestPermission();
|
||||
Sao.login();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
+6
-1
@@ -59,7 +59,12 @@
|
||||
|
||||
Sao.Bus.handle = function(message) {
|
||||
var notify = function(message) {
|
||||
if (Notification.permission != "granted") {
|
||||
try {
|
||||
if (Notification.permission != "granted") {
|
||||
return;
|
||||
}
|
||||
} catch (e) {
|
||||
(console.error || console.log).call(console, e, e.stack);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1003,6 +1003,12 @@ var Sao = {};
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
set_shortcuts();
|
||||
try {
|
||||
Notification.requestPermission();
|
||||
} catch (e) {
|
||||
(console.error || console.log).call(console, e, e.stack);
|
||||
}
|
||||
Sao.login();
|
||||
});
|
||||
|
||||
function set_shortcuts() {
|
||||
|
||||
Reference in New Issue
Block a user