This commit is contained in:
Calvin Montgomery 2018-11-15 22:40:01 -08:00
parent 4ccdca6dca
commit 8c9622f1b2
2 changed files with 15 additions and 15 deletions

View File

@ -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"
}, },

View File

@ -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");
} else {
document.addEventListener("visibilitychange", function () {
if (document.hidden) {
FOCUSED = false;
} else {
FOCUSED = true; FOCUSED = true;
clearInterval(TITLE_BLINK); clearInterval(TITLE_BLINK);
TITLE_BLINK = false; TITLE_BLINK = false;
document.title = PAGETITLE; 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 () { $("#togglemotd").click(function () {
var hidden = $("#motd").css("display") === "none"; var hidden = $("#motd").css("display") === "none";