mirror of https://github.com/calzoneman/sync.git
Fix #783
This commit is contained in:
parent
4ccdca6dca
commit
8c9622f1b2
|
@ -2,7 +2,7 @@
|
|||
"author": "Calvin Montgomery",
|
||||
"name": "CyTube",
|
||||
"description": "Online media synchronizer and chat",
|
||||
"version": "3.61.0",
|
||||
"version": "3.61.1",
|
||||
"repository": {
|
||||
"url": "http://github.com/calzoneman/sync"
|
||||
},
|
||||
|
|
20
www/js/ui.js
20
www/js/ui.js
|
@ -1,18 +1,18 @@
|
|||
/* window focus/blur */
|
||||
if (typeof document.hidden === "undefined") {
|
||||
console.error("Browser is too old; giving up on visibility tracking for notifications");
|
||||
} else {
|
||||
document.addEventListener("visibilitychange", function () {
|
||||
if (document.hidden) {
|
||||
FOCUSED = false;
|
||||
} else {
|
||||
CyTube.ui.onPageFocus = function () {
|
||||
FOCUSED = true;
|
||||
clearInterval(TITLE_BLINK);
|
||||
TITLE_BLINK = false;
|
||||
document.title = PAGETITLE;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
CyTube.ui.onPageBlur = function (event) {
|
||||
FOCUSED = false;
|
||||
};
|
||||
|
||||
$(window).focus(CyTube.ui.onPageFocus).blur(CyTube.ui.onPageBlur);
|
||||
// See #783
|
||||
$(".modal").focus(CyTube.ui.onPageFocus);
|
||||
|
||||
$("#togglemotd").click(function () {
|
||||
var hidden = $("#motd").css("display") === "none";
|
||||
|
|
Loading…
Reference in New Issue