mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
15 lines
293 B
JavaScript
15 lines
293 B
JavaScript
(function () {
|
|
'use strict';
|
|
|
|
var windowFocused = false;
|
|
window.addEventListener('blur', function() {
|
|
windowFocused = false;
|
|
});
|
|
window.addEventListener('focus', function() {
|
|
windowFocused = true;
|
|
});
|
|
|
|
window.isFocused = function() {
|
|
return windowFocused;
|
|
};
|
|
})();
|