Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
fgfobdpqjs authored Feb 16, 2024
1 parent fb7f582 commit 9ca9b01
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions CHICXK/static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'}
]
Expand Down Expand Up @@ -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));
}
Expand Down Expand Up @@ -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){
Expand Down

0 comments on commit 9ca9b01

Please sign in to comment.