Files
Signal-Desktop/js/focus_listener.js
2017-09-14 16:53:37 -07:00

17 lines
286 B
JavaScript

(function () {
'use strict';
var windowFocused;
window.addEventListener('blur', function() {
windowFocused = false;
});
window.addEventListener('focus', function() {
windowFocused = true;
});
window.isFocused = function() {
return windowFocused;
};
})();