applied translate_table to score.js

This commit is contained in:
vvo
2023-03-25 03:47:14 +08:00
parent 007ae3c276
commit 835e174fe0
2 changed files with 29 additions and 1 deletions
+29
View File
@@ -230,6 +230,34 @@ $(document).ready(function() {
//$('#music_score').DataTable();
$.getJSON("static/asset/json/music_db.json", function(json) {
const translate_table = {
'龕': '€',
'釁': '🍄',
'驩': 'Ø',
'曦': 'à',
'齷': 'é',
'骭': 'ü',
'齶': '♡',
'彜': 'ū',
'罇': 'ê',
'雋': 'Ǜ',
'鬻': '♃',
'鬥': 'Ã',
'鬆': 'Ý',
'曩': 'è',
'驫': 'ā',
'齲': '♥',
'騫': 'á',
'趁': 'Ǣ',
'鬮': '¡',
'盥': '⚙︎',
'隍': '︎Ü',
'頽': 'ä',
'餮': 'Ƶ',
'黻': '*',
'蔕': 'ũ',
'闃': 'Ā'
}
music_db = json;
var music_data = [];
@@ -238,6 +266,7 @@ $(document).ready(function() {
var temp_data = {};
temp_data.mid = profile_data[i].mid;
temp_data.songname = getSongName(profile_data[i].mid);
temp_data.songname = temp_data.songname.replace(/[龕釁驩曦齷骭齶彜罇雋鬻鬥鬆曩驫齲騫趁鬮盥隍頽餮黻蔕闃]/g, m => translate_table[m]);
temp_data.diff = getDifficulty(profile_data[i].mid, profile_data[i].type);
temp_data.releasedate = getReleaseDate(profile_data[i].mid);
temp_data.score = profile_data[i].score;
@@ -42,7 +42,6 @@ $(document).ready(function() {
'蔕': 'ũ',
'闃': 'Ā'
}
music_db = json;
var music_data = [];
for (let mdata in music_db.mdb.music) {