session-desktop/js/focus_listener.js
Scott Nonnenberg 43a44793c5 Remove jshint - move everything over to eslint
Also removed all hints of previous linters
2018-07-17 15:54:32 -07:00

14 lines
298 B
JavaScript

// eslint-disable-next-line func-names
(function() {
'use strict';
let windowFocused = false;
window.addEventListener('blur', () => {
windowFocused = false;
});
window.addEventListener('focus', () => {
windowFocused = true;
});
window.isFocused = () => windowFocused;
})();