mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix autofixable eslint warnings
This commit is contained in:
parent
b885cfdc83
commit
9077782c17
11 changed files with 20 additions and 28 deletions
|
@ -178,7 +178,7 @@ function resetThrottle(key) {
|
|||
const isElectron = navigator.userAgent.toLowerCase().indexOf('electron') !== -1;
|
||||
function allowInput() {
|
||||
// This would be nice but always seems to return true with electron
|
||||
if (!isElectron && document.hidden) { /* eslint-disable-line compat/compat */
|
||||
if (!isElectron && document.hidden) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -356,7 +356,6 @@ function isGamepadConnected() {
|
|||
}
|
||||
|
||||
function onFocusOrGamepadAttach() {
|
||||
/* eslint-disable-next-line compat/compat */
|
||||
if (isGamepadConnected() && document.hasFocus()) {
|
||||
console.log('Gamepad connected! Starting input loop');
|
||||
startInputLoop();
|
||||
|
@ -364,7 +363,6 @@ function onFocusOrGamepadAttach() {
|
|||
}
|
||||
|
||||
function onFocusOrGamepadDetach() {
|
||||
/* eslint-disable-next-line compat/compat */
|
||||
if (!isGamepadConnected() || !document.hasFocus()) {
|
||||
console.log('Gamepad disconnected! No other gamepads are connected, stopping input loop');
|
||||
stopInputLoop();
|
||||
|
|
|
@ -239,7 +239,7 @@ function attachGamepadScript() {
|
|||
}
|
||||
|
||||
// No need to check for gamepads manually at load time, the eventhandler will be fired for that
|
||||
if (navigator.getGamepads && appSettings.enableGamepad()) { /* eslint-disable-line compat/compat */
|
||||
if (navigator.getGamepads && appSettings.enableGamepad()) {
|
||||
window.addEventListener('gamepadconnected', attachGamepadScript);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue