From 9ca9b014f1034851eda1dfd4a069539708adf172 Mon Sep 17 00:00:00 2001 From: fgfobdpqjs <142361890+fgfobdpqjs@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:15:35 +0800 Subject: [PATCH] Add files via upload --- CHICXK/static/index.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CHICXK/static/index.js b/CHICXK/static/index.js index e5903bc..5ea9059 100644 --- a/CHICXK/static/index.js +++ b/CHICXK/static/index.js @@ -2,17 +2,15 @@ const MODE_NORMAL = 1, MODE_ENDLESS = 2, MODE_PRACTICE = 3; (function(w) { function getJsonI18N() { - // https://developer.mozilla.org/docs/Web/API/Navigator/language + // https://developer.mozilla.org/zh-CN/docs/Web/API/Navigator/language const LANGUAGES = [ { regex: /^zh-CN\b/, lang: 'zh' }, { regex: /^zh-TW\b/, lang: 'zht' }, { regex: /^zh-HK\b/, lang: 'zht' }, - { regex: /^zh-MO\b/, lang: 'zht' }, { regex: /^zh-cn\b/, lang: 'zh' }, { regex: /^zh-tw\b/, lang: 'zht' }, { regex: /^zh-hk\b/, lang: 'zht' }, - { regex: /^zh-mo\b/, lang: 'zht' }, { regex: /^ja\b/, lang: 'ja' }, { regex: /.*/, lang: 'en'} ] @@ -289,8 +287,8 @@ const MODE_NORMAL = 1, MODE_ENDLESS = 2, MODE_PRACTICE = 3; let httpRequest = new XMLHttpRequest(); httpRequest.open('POST', './SubmitResults.php', true); httpRequest.setRequestHeader("Content-type", "application/json"); - let name = $("#username0").val(); - let message = $("#message0").val(); + let name = $("#username").val(); + let message = $("#message").val(); let test = "|_|"; httpRequest.send(encrypt(_gameScore + test + name + test + tj + test + message)); } @@ -559,7 +557,7 @@ const MODE_NORMAL = 1, MODE_ENDLESS = 2, MODE_PRACTICE = 3; } w.save_cookie = function() { - const settings = ['username', 'message', 'keyboard', 'title', 'gameTime']; + const settings = ['username0', 'message0', 'keyboard', 'title', 'gameTime']; for (let s of settings) { let value=$(`#${s}`).val(); if(value){