bug of custom sound

This commit is contained in:
cutls 2020-09-08 18:49:55 +09:00
parent 69d60a7372
commit 62df4e2fac

View File

@ -167,10 +167,10 @@ function load() {
var font = ''
}
$('#font').val(font)
$('#c1-file').text(localStorage.getItem('custom1'))
$('#c2-file').text(localStorage.getItem('custom2'))
$('#c3-file').text(localStorage.getItem('custom3'))
$('#c4-file').text(localStorage.getItem('custom4'))
$('#c1-file').text(localStorage.getItem('custom1')!= 'null' ? localStorage.getItem('custom1') : '')
$('#c2-file').text(localStorage.getItem('custom2')!= 'null' ? localStorage.getItem('custom2') : '')
$('#c3-file').text(localStorage.getItem('custom3')!= 'null' ? localStorage.getItem('custom3') : '')
$('#c4-file').text(localStorage.getItem('custom4')!= 'null' ? localStorage.getItem('custom4') : '')
var cvol = localStorage.getItem('customVol')
if (cvol) {
$('#soundvol').val(cvol * 100)
@ -754,7 +754,7 @@ function customSound(key) {
}
function customSoundSave(key, file) {
localStorage.setItem('custom' + key, file)
$('#c1-file').text(file)
$(`#c${key}-file`).text(file)
}
window.onload = function () {
//最初に読む