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"); 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";