#1005 Replace mobile detection method in get sortable delay. Make deviceInfo loading sync. Init Ross mods via function call.

This commit is contained in:
Cohee
2023-08-24 23:52:03 +03:00
parent ce67101651
commit 1900ab9726
6 changed files with 55 additions and 52 deletions

View File

@ -7,8 +7,7 @@ import {
} from "../script.js";
import { SECRET_KEYS, writeSecret } from "./secrets.js";
import { delay } from "./utils.js";
import { deviceInfo } from "./RossAscends-mods.js";
import { power_user } from "./power-user.js";
import { getDeviceInfo } from "./RossAscends-mods.js";
import { autoSelectInstructPreset } from "./instruct-mode.js";
export {
@ -259,7 +258,8 @@ jQuery(function () {
$("#horde_kudos").on("click", showKudos);
// Not needed on mobile
if (deviceInfo.device.type === 'desktop') {
const deviceInfo = getDeviceInfo();
if (deviceInfo && deviceInfo.device.type === 'desktop') {
$('#horde_model').select2({
width: '100%',
placeholder: 'Select Horde models',