mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Remove boolean comparisons to isMobile
We know this function will *always* return a boolean, so we don't need to compare it to one.
This commit is contained in:
@ -507,7 +507,7 @@ export function dragElement(elmnt) {
|
|||||||
|| Number((String(target.height).replace('px', ''))) < 50
|
|| Number((String(target.height).replace('px', ''))) < 50
|
||||||
|| Number((String(target.width).replace('px', ''))) < 50
|
|| Number((String(target.width).replace('px', ''))) < 50
|
||||||
|| power_user.movingUI === false
|
|| power_user.movingUI === false
|
||||||
|| isMobile() === true
|
|| isMobile()
|
||||||
) {
|
) {
|
||||||
console.debug('aborting mutator');
|
console.debug('aborting mutator');
|
||||||
return;
|
return;
|
||||||
@ -715,7 +715,7 @@ export function dragElement(elmnt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function initMovingUI() {
|
export async function initMovingUI() {
|
||||||
if (isMobile() === false && power_user.movingUI === true) {
|
if (!isMobile() && power_user.movingUI === true) {
|
||||||
console.debug('START MOVING UI');
|
console.debug('START MOVING UI');
|
||||||
dragElement($('#sheld'));
|
dragElement($('#sheld'));
|
||||||
dragElement($('#left-nav-panel'));
|
dragElement($('#left-nav-panel'));
|
||||||
|
@ -1530,7 +1530,7 @@ async function loadCharListState() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadMovingUIState() {
|
function loadMovingUIState() {
|
||||||
if (isMobile() === false
|
if (!isMobile()
|
||||||
&& power_user.movingUIState
|
&& power_user.movingUIState
|
||||||
&& power_user.movingUI === true) {
|
&& power_user.movingUI === true) {
|
||||||
console.debug('loading movingUI state');
|
console.debug('loading movingUI state');
|
||||||
|
Reference in New Issue
Block a user