client/js/shout.js: no longer closes Notifications in Safari
Closes #11
This commit is contained in:
parent
d0c6f8aae3
commit
7e10dc8254
|
@ -35,6 +35,13 @@ $(function() {
|
||||||
$("html").addClass("web-app-mode");
|
$("html").addClass("web-app-mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Browser detection, http://stackoverflow.com/a/2401861.
|
||||||
|
var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; // Opera 8.0+ (UA detection to detect Blink/v8-powered Opera)
|
||||||
|
var isFirefox = typeof InstallTrigger !== 'undefined'; // Firefox 1.0+
|
||||||
|
var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; // At least Safari 3+: "[object HTMLElementConstructor]"
|
||||||
|
var isChrome = !!window.chrome && !isOpera; // Chrome 1+
|
||||||
|
var isIE = /*@cc_on!@*/false || !!document.documentMode; // At least IE6
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var pop = new Audio();
|
var pop = new Audio();
|
||||||
pop.src = "/audio/pop.ogg";
|
pop.src = "/audio/pop.ogg";
|
||||||
|
@ -583,9 +590,12 @@ $(function() {
|
||||||
button.click();
|
button.click();
|
||||||
this.close();
|
this.close();
|
||||||
};
|
};
|
||||||
window.setTimeout(function() {
|
|
||||||
notify.close();
|
if (!isSafari) {
|
||||||
}, 5 * 1000);
|
window.setTimeout(function() {
|
||||||
|
notify.close();
|
||||||
|
}, 5 * 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue