From 8cfc8ebe6681feeed7c2c3089d70ec0b8a46697d Mon Sep 17 00:00:00 2001 From: valadaptive Date: Thu, 14 Dec 2023 18:05:59 -0500 Subject: [PATCH] Remove boolean comparisons to isMobile We know this function will *always* return a boolean, so we don't need to compare it to one. --- public/scripts/RossAscends-mods.js | 4 ++-- public/scripts/power-user.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/scripts/RossAscends-mods.js b/public/scripts/RossAscends-mods.js index ffa1c1640..2f928b458 100644 --- a/public/scripts/RossAscends-mods.js +++ b/public/scripts/RossAscends-mods.js @@ -507,7 +507,7 @@ export function dragElement(elmnt) { || Number((String(target.height).replace('px', ''))) < 50 || Number((String(target.width).replace('px', ''))) < 50 || power_user.movingUI === false - || isMobile() === true + || isMobile() ) { console.debug('aborting mutator'); return; @@ -715,7 +715,7 @@ export function dragElement(elmnt) { } export async function initMovingUI() { - if (isMobile() === false && power_user.movingUI === true) { + if (!isMobile() && power_user.movingUI === true) { console.debug('START MOVING UI'); dragElement($('#sheld')); dragElement($('#left-nav-panel')); diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index 2983047d9..ef6674306 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -1530,7 +1530,7 @@ async function loadCharListState() { } function loadMovingUIState() { - if (isMobile() === false + if (!isMobile() && power_user.movingUIState && power_user.movingUI === true) { console.debug('loading movingUI state');