From fecd82fe75bc9a91ae09ca651b298def6582e19b Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Sat, 7 May 2022 20:56:44 -0700 Subject: [PATCH] temp foreign char regex --- resources/js/helpers.js | 2 +- resources/js/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/helpers.js b/resources/js/helpers.js index 03f59de..a6c9653 100644 --- a/resources/js/helpers.js +++ b/resources/js/helpers.js @@ -129,7 +129,7 @@ async function openGrasscutterFolder() { // https://www.jimzhao.us/2015/09/javascript-detect-chinese-character.html function hasForeignChars(str) { - let re1 = /^[\x00-\x7F]+$/g + let re1 = /^[A-Za-z\d,.?;:\\/'"!$%() ]*/g str = str.replace(/\s/g, '') debug.log('Checking for foreign chars in path: ', str) diff --git a/resources/js/index.js b/resources/js/index.js index 1d02706..373f625 100644 --- a/resources/js/index.js +++ b/resources/js/index.js @@ -528,7 +528,7 @@ async function setGrasscutterFolder() { async function launchOfficial() { const config = await getCfg() - debug.log('Launching game') + debug.log('Launching game at ' + config.gameexe) Neutralino.os.execCommand(`"${config.gameexe}"`) }