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