danoniplus 34.4.1 → 34.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/js/danoni_main.js +177 -246
  2. package/package.json +1 -1
package/js/danoni_main.js CHANGED
@@ -4,12 +4,12 @@
4
4
  *
5
5
  * Source by tickle
6
6
  * Created : 2018/10/08
7
- * Revised : 2023/10/31
7
+ * Revised : 2023/11/03
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 34.4.1`;
12
- const g_revisedDate = `2023/10/31`;
11
+ const g_version = `Ver 34.4.2`;
12
+ const g_revisedDate = `2023/11/03`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -209,7 +209,7 @@ let g_canLoadDifInfoFlg = false;
209
209
  * div要素のstyleを取得
210
210
  * @param {string} _id
211
211
  */
212
- const $id = _id => document.getElementById(`${_id}`).style;
212
+ const $id = _id => document.getElementById(_id).style;
213
213
 
214
214
  /**
215
215
  * 複数のdiv子要素を親要素へ接続
@@ -360,7 +360,7 @@ const hasValInArray = (_val, _array, _pos = 0) =>
360
360
  * @param {array} _data
361
361
  * @param {integer} _length
362
362
  */
363
- const hasArrayList = (_data, _length = 1) => _data !== undefined && _data.length >= _length;
363
+ const hasArrayList = (_data, _length = 1) => _data?.length >= _length;
364
364
 
365
365
  /**
366
366
  * 改行コード区切りの配列展開
@@ -569,11 +569,8 @@ const commonKeyDown = (_evt, _displayName, _func = _code => { }, _dfEvtFlg) => {
569
569
  switchKeyHit(_evt, true);
570
570
 
571
571
  // 対象ボタンを検索
572
- const scLists = Object.keys(g_shortcutObj[_displayName]).filter(keys => {
573
- const keyset = keys.split(`_`);
574
- return (keyset.length > 2 ? keyIsDown(keyset[0]) && keyIsDown(keyset[1]) && keyIsDown(keyset[2]) :
575
- (keyset.length > 1 ? keyIsDown(keyset[0]) && keyIsDown(keyset[1]) : keyIsDown(keyset[0])));
576
- });
572
+ const scLists = Object.keys(g_shortcutObj[_displayName])
573
+ .filter(keys => keys.split(`_`).every(key => keyIsDown(key)));
577
574
  if (scLists.length > 0) {
578
575
  // リンク先にジャンプする場合はonkeyUpイベントが動かないため、事前にキー状態をリセット
579
576
  if (g_shortcutObj[_displayName][scLists[0]].reset) {
@@ -597,7 +594,7 @@ const commonKeyDown = (_evt, _displayName, _func = _code => { }, _dfEvtFlg) => {
597
594
  const commonKeyUp = _evt => {
598
595
  g_inputKeyBuffer[g_kCdNameObj.metaLKey] = false;
599
596
  g_inputKeyBuffer[g_kCdNameObj.metaRKey] = false;
600
- g_inputKeyBuffer[_evt.code] = false;
597
+ switchKeyHit(_evt);
601
598
  };
602
599
 
603
600
  /**
@@ -612,7 +609,7 @@ const createScText = (_obj, _settingLabel, { displayName = `option`, dfLabel = `
612
609
  if (scKey.length > 0) {
613
610
  multiAppend(_obj,
614
611
  createDivCss2Label(`sc${_settingLabel}`,
615
- g_scViewObj.format.split(`{0}`).join(dfLabel !== `` ? `${dfLabel}` : `${g_kCd[g_kCdN.findIndex(kCd => kCd === scKey[0])] ?? ''}`), {
612
+ g_scViewObj.format.split(`{0}`).join(dfLabel || (`${g_kCd[g_kCdN.findIndex(kCd => kCd === scKey[0])] ?? ''}`)), {
616
613
  x, y, w, siz, fontWeight: `bold`, opacity: 0.75, pointerEvents: C_DIS_NONE,
617
614
  })
618
615
  );
@@ -694,11 +691,7 @@ const preloadFile = (_as, _href, _type = ``, _crossOrigin = `anonymous`) => {
694
691
 
695
692
  if (preloadFlg === undefined) {
696
693
  g_preloadFiles.all.push(_href);
697
-
698
- if (g_preloadFiles[_as] === undefined) {
699
- g_preloadFiles[_as] = [];
700
- }
701
- g_preloadFiles[_as].push(_href);
694
+ g_preloadFiles[_as]?.push(_href) || (g_preloadFiles[_as] = [_href]);
702
695
 
703
696
  if (g_userAgent.indexOf(`firefox`) !== -1 && _as === `image`) {
704
697
  // Firefoxの場合のみpreloadが効かないため、画像読込形式にする
@@ -895,7 +888,7 @@ const colorNameToCode = _color => {
895
888
  * 10進 -> 16進数変換 (カラーコード形式になるよう0埋め)
896
889
  * @param {number} _num
897
890
  */
898
- const byteToHex = _num => (`${_num.toString(16).padStart(2, '0')}`);
891
+ const byteToHex = _num => _num.toString(16).padStart(2, '0');
899
892
 
900
893
  /**
901
894
  * カラーコードかどうかを判定 (簡易版)
@@ -1163,13 +1156,11 @@ const createColorObject2 = (_id,
1163
1156
  const style = div.style;
1164
1157
 
1165
1158
  // 矢印・オブジェクト判定
1166
- let charaStyle;
1159
+ let charaStyle = `arrow${styleName}`;
1167
1160
  if (isNaN(parseFloat(rotate))) {
1168
1161
  const objData = rotate.split(`:`);
1169
1162
  rotate = setVal(objData[1], 0, C_TYP_FLOAT);
1170
1163
  charaStyle = `${objData[0]}${styleName}`;
1171
- } else {
1172
- charaStyle = `arrow${styleName}`;
1173
1164
  }
1174
1165
  if (g_stateObj.rotateEnabled) {
1175
1166
  style.transform = `rotate(${rotate}deg)`;
@@ -1214,7 +1205,7 @@ const createEmptySprite = (_parentObj, _newObjId, { x = 0, y = 0, w = g_sWidth,
1214
1205
  * @param {number} _num
1215
1206
  */
1216
1207
  const createMultipleSprite = (_baseName, _num, { x = 0 } = {}) => {
1217
- const sprite = createEmptySprite(divRoot, `${_baseName}`);
1208
+ const sprite = createEmptySprite(divRoot, _baseName);
1218
1209
  for (let j = 0; j <= _num; j++) {
1219
1210
  createEmptySprite(sprite, `${_baseName}${j}`, { x });
1220
1211
  }
@@ -1258,7 +1249,7 @@ const g_handler = (_ => {
1258
1249
  */
1259
1250
  const deleteChildspriteAll = _parentObjName => {
1260
1251
 
1261
- const parentsprite = document.querySelector(`#${_parentObjName}`);
1252
+ const parentsprite = document.getElementById(_parentObjName);
1262
1253
  while (parentsprite.hasChildNodes()) {
1263
1254
  g_handler.removeListener(parentsprite.firstChild.getAttribute(`lsnrkey`));
1264
1255
  g_handler.removeListener(parentsprite.firstChild.getAttribute(`lsnrkeyTS`));
@@ -1357,7 +1348,7 @@ const createCss2Button = (_id, _text, _func = _ => true, { x = 0, y = g_sHeight
1357
1348
  * @param {object} _obj (x, y, w, h, siz, align, title, ...rest)
1358
1349
  */
1359
1350
  const changeStyle = (_id, { x, y, w, h, siz, align, title, ...rest } = {}) => {
1360
- const div = document.querySelector(`#${_id}`);
1351
+ const div = document.getElementById(_id);
1361
1352
  const style = div.style;
1362
1353
 
1363
1354
  const obj = {
@@ -1436,12 +1427,12 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
1436
1427
  return ctx;
1437
1428
  };
1438
1429
 
1439
- if (document.querySelector(`#layer0`) !== null) {
1430
+ if (document.getElementById(`layer0`) !== null) {
1440
1431
 
1441
1432
  // レイヤー情報取得
1442
1433
  const l0ctx = getLayerWithClear(`layer0`);
1443
1434
 
1444
- if (document.querySelector(`#layer1`) !== null) {
1435
+ if (document.getElementById(`layer1`) !== null) {
1445
1436
  const l1ctx = getLayerWithClear(`layer1`);
1446
1437
 
1447
1438
  // 線画 (title-line)
@@ -1457,7 +1448,7 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
1457
1448
  l1ctx.lineTo(layer1.width, g_sHeight);
1458
1449
  l1ctx.stroke();
1459
1450
  }
1460
- if (document.querySelector(`#layer2`) !== null) {
1451
+ if (document.getElementById(`layer2`) !== null) {
1461
1452
  getLayerWithClear(`layer2`);
1462
1453
  }
1463
1454
 
@@ -1478,7 +1469,7 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
1478
1469
  g_cxtAddFunc = {};
1479
1470
  g_cxtDeleteFlg = {};
1480
1471
 
1481
- if (document.querySelector(`#layer0`) === null ||
1472
+ if (document.getElementById(`layer0`) === null ||
1482
1473
  (!g_headerObj[`customBack${_customDisplayName}Use`] && !g_headerObj.defaultSkinFlg)) {
1483
1474
 
1484
1475
  $id(`canvas-frame`).width = wUnit(g_sWidth + diffX);
@@ -1501,11 +1492,9 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
1501
1492
  * @param {string} _propData
1502
1493
  */
1503
1494
  const getCssCustomProperty = (_prop, _propData) =>
1504
- document.documentElement.style.getPropertyValue(_propData) !== `` ?
1505
- document.documentElement.style.getPropertyValue(_propData) :
1506
- g_cssBkProperties[_propData] !== undefined ?
1507
- g_cssBkProperties[_propData] :
1508
- _prop.endsWith(`-x`) ? _propData : reviseCssText(makeColorGradation(_propData, { _defaultColorgrd: false }));
1495
+ document.documentElement.style.getPropertyValue(_propData) || (g_cssBkProperties[_propData] ?? (
1496
+ _prop.endsWith(`-x`) ? _propData : reviseCssText(makeColorGradation(_propData, { _defaultColorgrd: false }))
1497
+ ));
1509
1498
 
1510
1499
  /**
1511
1500
  * CSSカスタムプロパティの値をオブジェクトへ退避
@@ -1738,11 +1727,11 @@ const getSpriteJumpFrame = _frames => {
1738
1727
  * @param {boolean} _condition
1739
1728
  */
1740
1729
  const drawBaseSpriteData = (_spriteData, _name, _condition = true) => {
1741
- const baseSprite = document.querySelector(`#${_name}Sprite${_spriteData.depth}`);
1730
+ const baseSprite = document.getElementById(`${_name}Sprite${_spriteData.depth}`);
1742
1731
  if (_spriteData.command === ``) {
1743
1732
  if (_spriteData.depth === C_FLG_ALL) {
1744
1733
  for (let j = 0; j <= g_scoreObj[`${_name}MaxDepth`]; j++) {
1745
- document.querySelector(`#${_name}Sprite${j}`).textContent = ``;
1734
+ document.getElementById(`${_name}Sprite${j}`).textContent = ``;
1746
1735
  }
1747
1736
  } else {
1748
1737
  baseSprite.textContent = ``;
@@ -1896,10 +1885,7 @@ class AudioPlayer {
1896
1885
  }
1897
1886
 
1898
1887
  addEventListener(_type, _listener) {
1899
- if (this._eventListeners[_type] === undefined) {
1900
- this._eventListeners[_type] = [];
1901
- }
1902
- this._eventListeners[_type].push(_listener);
1888
+ this._eventListeners[_type]?.push(_listener) || (this._eventListeners[_type] = [_listener]);
1903
1889
  }
1904
1890
 
1905
1891
  removeEventListener(_type, _listener) {
@@ -1996,12 +1982,12 @@ const transTimerToFrame = _str => {
1996
1982
 
1997
1983
  const initialControl = async () => {
1998
1984
 
1999
- const stage = document.querySelector(`#canvas-frame`);
1985
+ const stage = document.getElementById(`canvas-frame`);
2000
1986
  const divRoot = createEmptySprite(stage, `divRoot`, g_windowObj.divRoot);
2001
1987
 
2002
1988
  // 背景の表示
2003
- if (document.querySelector(`#layer0`) !== null) {
2004
- const layer0 = document.querySelector(`#layer0`);
1989
+ if (document.getElementById(`layer0`) !== null) {
1990
+ const layer0 = document.getElementById(`layer0`);
2005
1991
  makeBgCanvas(layer0.getContext(`2d`));
2006
1992
  } else {
2007
1993
  createEmptySprite(divRoot, `divBack`, g_windowObj.divBack);
@@ -2014,8 +2000,8 @@ const initialControl = async () => {
2014
2000
  g_canLoadDifInfoFlg = true;
2015
2001
 
2016
2002
  // 譜面データの読み込みオプション
2017
- g_enableAmpersandSplit = setBoolVal(document.querySelector(`#enableAmpersandSplit`)?.value, true);
2018
- g_enableDecodeURI = setBoolVal(document.querySelector(`#enableDecodeURI`)?.value);
2003
+ g_enableAmpersandSplit = setBoolVal(document.getElementById(`enableAmpersandSplit`)?.value, true);
2004
+ g_enableDecodeURI = setBoolVal(document.getElementById(`enableDecodeURI`)?.value);
2019
2005
 
2020
2006
  // 作品別ローカルストレージの読み込み
2021
2007
  loadLocalStorage();
@@ -2041,7 +2027,7 @@ const initialControl = async () => {
2041
2027
  Object.assign(g_headerObj, preheaderConvert(g_rootObj));
2042
2028
 
2043
2029
  // CSSファイル内のbackgroundを取得するために再描画
2044
- if (document.querySelector(`#layer0`) === null) {
2030
+ if (document.getElementById(`layer0`) === null) {
2045
2031
  deleteDiv(divRoot, `divBack`);
2046
2032
  createEmptySprite(divRoot, `divBack`);
2047
2033
  } else if (!g_headerObj.defaultSkinFlg && !g_headerObj.customBackUse) {
@@ -2148,8 +2134,8 @@ const initialControl = async () => {
2148
2134
  if (g_loadObj.main) {
2149
2135
 
2150
2136
  // 譜面分割、譜面番号固定かどうかをチェック
2151
- g_stateObj.dosDivideFlg = setBoolVal(document.querySelector(`#externalDosDivide`)?.value ?? getQueryParamVal(`dosDivide`));
2152
- g_stateObj.scoreLockFlg = setBoolVal(document.querySelector(`#externalDosLock`)?.value ?? getQueryParamVal(`dosLock`));
2137
+ g_stateObj.dosDivideFlg = setBoolVal(document.getElementById(`externalDosDivide`)?.value ?? getQueryParamVal(`dosDivide`));
2138
+ g_stateObj.scoreLockFlg = setBoolVal(document.getElementById(`externalDosLock`)?.value ?? getQueryParamVal(`dosLock`));
2153
2139
 
2154
2140
  for (let j = 1; j < g_headerObj.keyLabels.length; j++) {
2155
2141
 
@@ -2257,10 +2243,10 @@ const dosConvert = (_dos = ``) => {
2257
2243
  */
2258
2244
  const loadChartFile = async (_scoreId = g_stateObj.scoreId) => {
2259
2245
 
2260
- const dosInput = document.querySelector(`#dos`);
2261
- const divRoot = document.querySelector(`#divRoot`);
2246
+ const dosInput = document.getElementById(`dos`);
2247
+ const divRoot = document.getElementById(`divRoot`);
2262
2248
  const queryDos = getQueryParamVal(`dos`) !== null ?
2263
- `dos/${getQueryParamVal('dos')}.txt` : encodeURI(document.querySelector(`#externalDos`)?.value ?? ``);
2249
+ `dos/${getQueryParamVal('dos')}.txt` : encodeURI(document.getElementById(`externalDos`)?.value ?? ``);
2264
2250
 
2265
2251
  if (dosInput === null && queryDos === ``) {
2266
2252
  makeWarningWindow(g_msgInfoObj.E_0023);
@@ -2281,7 +2267,7 @@ const loadChartFile = async (_scoreId = g_stateObj.scoreId) => {
2281
2267
 
2282
2268
  // 外部dos読み込み
2283
2269
  if (queryDos !== ``) {
2284
- const charset = document.querySelector(`#externalDosCharset`)?.value ?? document.characterSet;
2270
+ const charset = document.getElementById(`externalDosCharset`)?.value ?? document.characterSet;
2285
2271
  const fileBase = queryDos.match(/.+\..*/)[0];
2286
2272
  const fileExtension = fileBase.split(`.`).pop();
2287
2273
  const fileCommon = fileBase.split(`.${fileExtension}`)[0];
@@ -3169,14 +3155,14 @@ const headerConvert = _dosObj => {
3169
3155
 
3170
3156
  // Display使用可否設定を分解 |displayUse=false,ON|
3171
3157
  const displayTempUse = _dosObj[`${option}Use`] ?? g_presetObj.settingUse?.[option] ?? `true`;
3172
- const displayUse = (displayTempUse !== undefined ? displayTempUse.split(`,`) : [true, C_FLG_ON]);
3158
+ const displayUse = displayTempUse?.split(`,`) ?? [true, C_FLG_ON];
3173
3159
 
3174
3160
  // displayUse -> ボタンの有効/無効, displaySet -> ボタンの初期値(ON/OFF)
3175
3161
  obj[`${option}Use`] = setBoolVal(displayUse[0], true);
3176
3162
  obj[`${option}Set`] = setVal(displayUse.length > 1 ? displayUse[1] :
3177
3163
  boolToSwitch(obj[`${option}Use`]), ``, C_TYP_SWITCH);
3178
3164
  g_stateObj[`d_${option.toLowerCase()}`] = setVal(obj[`${option}Set`], C_FLG_ON, C_TYP_SWITCH);
3179
- obj[`${option}ChainOFF`] = (_dosObj[`${option}ChainOFF`] !== undefined ? _dosObj[`${option}ChainOFF`].split(`,`) : []);
3165
+ obj[`${option}ChainOFF`] = _dosObj[`${option}ChainOFF`]?.split(`,`) ?? [];
3180
3166
 
3181
3167
  // Displayのデフォルト設定で、双方向に設定されている場合は設定をブロック
3182
3168
  g_displays.filter((option2, k) =>
@@ -3254,7 +3240,7 @@ const headerConvert = _dosObj => {
3254
3240
  obj.commentVal = tmpComment.split(`\n`).join(newlineTag);
3255
3241
 
3256
3242
  // クレジット表示
3257
- if (document.querySelector(`#webMusicTitle`) !== null) {
3243
+ if (document.getElementById(`webMusicTitle`) !== null) {
3258
3244
  webMusicTitle.innerHTML =
3259
3245
  `<span style="font-size:${wUnit(32)}">${obj.musicTitleForView.join(`<br>`)}</span><br>
3260
3246
  <span style="font-size:${wUnit(16)}">(Artist: <a href="${obj.artistUrl}" target="_blank">${obj.artistName}</a>)</span>`;
@@ -3417,7 +3403,7 @@ const resetBaseColorList = (_baseObj, _dosObj, { scoreId = `` } = {}) => {
3417
3403
 
3418
3404
  // フリーズアロー色
3419
3405
  const tmpFrzColors = (frzColorTxt !== undefined ? splitLF2(frzColorTxt) : []);
3420
- const firstFrzColors = (tmpFrzColors[0] !== undefined ? tmpFrzColors[0].split(`,`) : []);
3406
+ const firstFrzColors = tmpFrzColors[0]?.split(`,`) ?? [];
3421
3407
 
3422
3408
  for (let j = 0; j < _baseObj.setColorInit.length; j++) {
3423
3409
 
@@ -3744,8 +3730,7 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`)
3744
3730
  // |keyCtrl9j=Tab,7_0,Enter| -> |keyCtrl9j=Tab,S,D,F,Space,J,K,L,Enter| のように補完
3745
3731
  g_keyObj[`${keyheader}_${k + dfPtn}`] =
3746
3732
  tmpArray[k].split(`,`).map(n =>
3747
- g_keyObj[`${_name}${getKeyPtnName(n)}`] !== undefined ?
3748
- structuredClone(g_keyObj[`${_name}${getKeyPtnName(n)}`]) : [_convFunc(n)]
3733
+ structuredClone(g_keyObj[`${_name}${getKeyPtnName(n)}`]) ?? [_convFunc(n)]
3749
3734
  ).flat();
3750
3735
  if (baseCopyFlg) {
3751
3736
  g_keyObj[`${keyheader}_${k + dfPtn}d`] = structuredClone(g_keyObj[`${keyheader}_${k + dfPtn}`]);
@@ -3796,9 +3781,8 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`)
3796
3781
  // 部分的にキーパターン指定があった場合は既存パターンを展開 (例: |shuffle9j=2,7_0_0,2|)
3797
3782
  g_keyObj[`${keyheader}_${k + dfPtn}_${ptnCnt}`] =
3798
3783
  makeBaseArray(list.split(`,`).map(n =>
3799
- g_keyObj[`${_name}${getKeyPtnName(n)}`] !== undefined ?
3800
- structuredClone(g_keyObj[`${_name}${getKeyPtnName(n)}`]) :
3801
- [isNaN(parseInt(n)) ? n : parseInt(n, 10)]
3784
+ structuredClone(g_keyObj[`${_name}${getKeyPtnName(n)}`]) ??
3785
+ [isNaN(parseInt(n)) ? n : parseInt(n, 10)]
3802
3786
  ).flat(), g_keyObj[`${g_keyObj.defaultProp}${_key}_${k + dfPtn}`].length, 0);
3803
3787
  ptnCnt++;
3804
3788
  }
@@ -3873,9 +3857,8 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`)
3873
3857
  const tmpParamPair = pairs.split(`::`);
3874
3858
  g_keyObj[pairName][tmpParamPair[0]] =
3875
3859
  makeBaseArray(tmpParamPair[1]?.split(`,`).map(n =>
3876
- g_keyObj[`${_pairName}${getKeyPtnName(n)}`] !== undefined ?
3877
- structuredClone(g_keyObj[`${_pairName}${getKeyPtnName(n)}`][tmpParamPair[0]]) :
3878
- [n === `-` ? -1 : parseInt(n, 10)]
3860
+ structuredClone(g_keyObj[`${_pairName}${getKeyPtnName(n)}`]?.[tmpParamPair[0]]) ??
3861
+ [n === `-` ? -1 : parseInt(n, 10)]
3879
3862
  ).flat(), g_keyObj[`${g_keyObj.defaultProp}${_key}_${k + dfPtn}`].length, _defaultVal);
3880
3863
  }
3881
3864
  });
@@ -4046,7 +4029,7 @@ const titleInit = _ => {
4046
4029
  if (!g_stateObj.dataSaveFlg || hasVal(g_keyObj[`transKey${keyCtrlPtn}`])) {
4047
4030
  g_canLoadDifInfoFlg = false;
4048
4031
  }
4049
- const divRoot = document.querySelector(`#divRoot`);
4032
+ const divRoot = document.getElementById(`divRoot`);
4050
4033
 
4051
4034
  // 曲時間制御変数
4052
4035
  let thisTime;
@@ -4099,7 +4082,7 @@ const titleInit = _ => {
4099
4082
  }
4100
4083
 
4101
4084
  // 変数 titlesize の定義 (使用例: |titlesize=40$20|)
4102
- const titlefontsizes = (g_headerObj.titlesize !== `` ? g_headerObj.titlesize.split(`$`).join(`,`).split(`,`) : [titlefontsize, titlefontsize]);
4085
+ const titlefontsizes = (g_headerObj.titlesize?.split(`$`).join(`,`).split(`,`) || [titlefontsize, titlefontsize]);
4103
4086
  const titlefontsize1 = setIntVal(titlefontsizes[0], titlefontsize);
4104
4087
  const titlefontsize2 = setIntVal(titlefontsizes[1], titlefontsize1);
4105
4088
 
@@ -4251,7 +4234,7 @@ const titleInit = _ => {
4251
4234
  // コメント文の加工
4252
4235
  const convCommentVal = convertStrToVal(g_headerObj.commentVal);
4253
4236
  if (g_headerObj.commentExternal) {
4254
- if (document.querySelector(`#commentArea`) !== null) {
4237
+ if (document.getElementById(`commentArea`) !== null) {
4255
4238
  commentArea.innerHTML = convCommentVal;
4256
4239
  }
4257
4240
  } else {
@@ -4444,7 +4427,7 @@ const makePlayButton = _func => createCss2Button(`btnPlay`, g_lblNameObj.b_play,
4444
4427
  const optionInit = _ => {
4445
4428
 
4446
4429
  clearWindow(true);
4447
- const divRoot = document.querySelector(`#divRoot`);
4430
+ const divRoot = document.getElementById(`divRoot`);
4448
4431
  g_baseDisp = `Settings`;
4449
4432
  g_currentPage = `option`;
4450
4433
  g_stateObj.filterKeys = ``;
@@ -4499,7 +4482,7 @@ const inputSlider = (_slider, _link) => {
4499
4482
  * 譜面変更セレクターの削除
4500
4483
  */
4501
4484
  const resetDifWindow = _ => {
4502
- if (document.querySelector(`#difList`) !== null) {
4485
+ if (document.getElementById(`difList`) !== null) {
4503
4486
  deleteChildspriteAll(`difList`);
4504
4487
  [`difList`, `difCover`, `btnDifU`, `btnDifD`].forEach(obj => document.getElementById(obj).remove());
4505
4488
  g_currentPage = `option`;
@@ -4624,7 +4607,7 @@ const createDifWindow = (_key = ``) => {
4624
4607
  const changeDifficulty = (_num = 1) => {
4625
4608
  if (g_headerObj.difSelectorUse) {
4626
4609
  g_stateObj.filterKeys = ``;
4627
- if (document.querySelector(`#difList`) === null) {
4610
+ if (document.getElementById(`difList`) === null) {
4628
4611
  g_keyObj.prevKey = g_keyObj.currentKey;
4629
4612
  createDifWindow();
4630
4613
  } else {
@@ -4667,20 +4650,18 @@ const drawSpeedGraph = _scoreId => {
4667
4650
  const speed = speedObj[speedType].speed;
4668
4651
  const speedData = g_detailObj[`${speedType}Data`][_scoreId];
4669
4652
 
4670
- if (speedData !== undefined) {
4671
- for (let i = 0; i < speedData.length; i += 2) {
4672
- if (speedData[i] >= startFrame) {
4673
- frame.push(speedData[i] - startFrame);
4674
- speed.push(speedData[i + 1]);
4675
- }
4676
- speedObj[speedType].cnt++;
4653
+ for (let i = 0; i < speedData?.length; i += 2) {
4654
+ if (speedData[i] >= startFrame) {
4655
+ frame.push(speedData[i] - startFrame);
4656
+ speed.push(speedData[i + 1]);
4677
4657
  }
4678
- frame.push(playingFrame);
4679
- speed.push(speed.at(-1));
4658
+ speedObj[speedType].cnt++;
4680
4659
  }
4660
+ frame.push(playingFrame);
4661
+ speed.push(speed.at(-1));
4681
4662
  });
4682
4663
 
4683
- const canvas = document.querySelector(`#graphSpeed`);
4664
+ const canvas = document.getElementById(`graphSpeed`);
4684
4665
  const context = canvas.getContext(`2d`);
4685
4666
  drawBaseLine(context);
4686
4667
 
@@ -4734,7 +4715,7 @@ const drawSpeedGraph = _scoreId => {
4734
4715
  */
4735
4716
  const drawDensityGraph = _scoreId => {
4736
4717
 
4737
- const canvas = document.querySelector(`#graphDensity`);
4718
+ const canvas = document.getElementById(`graphDensity`);
4738
4719
  const context = canvas.getContext(`2d`);
4739
4720
  drawBaseLine(context);
4740
4721
  for (let j = 0; j < g_limitObj.densityDivision; j++) {
@@ -4780,16 +4761,16 @@ const drawDensityGraph = _scoreId => {
4780
4761
  */
4781
4762
  const updateScoreDetailLabel = (_name, _label, _value, _pos = 0, _labelname = _label) => {
4782
4763
  const baseLabel = (_bLabel, _bLabelname, _bAlign) =>
4783
- document.querySelector(`#detail${_name}`).appendChild(
4784
- createDivCss2Label(`${_bLabel}`, `${_bLabelname}`, {
4764
+ document.getElementById(`detail${_name}`).appendChild(
4765
+ createDivCss2Label(_bLabel, _bLabelname, {
4785
4766
  x: 10, y: 105 + _pos * 20, w: 100, h: 20, siz: g_limitObj.difSelectorSiz, align: _bAlign,
4786
4767
  })
4787
4768
  );
4788
- if (document.querySelector(`#data${_label}`) === null) {
4769
+ if (document.getElementById(`data${_label}`) === null) {
4789
4770
  baseLabel(`lbl${_label}`, `${_labelname}`, C_ALIGN_LEFT);
4790
4771
  baseLabel(`data${_label}`, `${_value}`, C_ALIGN_RIGHT);
4791
4772
  } else {
4792
- document.querySelector(`#data${_label}`).textContent = `${_value}`;
4773
+ document.getElementById(`data${_label}`).textContent = `${_value}`;
4793
4774
  }
4794
4775
  };
4795
4776
 
@@ -4824,7 +4805,7 @@ const drawLine = (_context, _y, _lineType, _fixed = 0) => {
4824
4805
  _context.lineWidth = 1;
4825
4806
 
4826
4807
  if (_lineType === `main`) {
4827
- const textBaseObj = document.querySelector(`#lnkDifficulty`);
4808
+ const textBaseObj = document.getElementById(`lnkDifficulty`);
4828
4809
  const textColor = window.getComputedStyle(textBaseObj, ``).color;
4829
4810
  _context.strokeStyle = textColor;
4830
4811
  _context.font = `${wUnit(12)} ${getBasicFont()}`;
@@ -4843,7 +4824,7 @@ const drawLine = (_context, _y, _lineType, _fixed = 0) => {
4843
4824
  const makeDifInfoLabels = _scoreId => {
4844
4825
 
4845
4826
  // ツール難易度
4846
- const detailToolDif = document.querySelector(`#detailToolDif`);
4827
+ const detailToolDif = document.getElementById(`detailToolDif`);
4847
4828
  /**
4848
4829
  * 譜面の難易度情報ラベルの作成
4849
4830
  * @param {string} _lbl
@@ -4907,7 +4888,7 @@ const makeDifInfo = _scoreId => {
4907
4888
  const frzCnts = sumData(g_detailObj.frzCnt[_scoreId]);
4908
4889
  const push3CntStr = (g_detailObj.toolDif[_scoreId].push3.length === 0 ? `None` : `(${g_detailObj.toolDif[_scoreId].push3})`);
4909
4890
 
4910
- if (document.querySelector(`#lblTooldif`) === null) {
4891
+ if (document.getElementById(`lblTooldif`) === null) {
4911
4892
  makeDifInfoLabels(_scoreId);
4912
4893
  }
4913
4894
  dataTooldif.textContent = g_detailObj.toolDif[_scoreId].tool;
@@ -5084,7 +5065,7 @@ const setDifficulty = (_initFlg) => {
5084
5065
  g_shortcutObj.option.KeyR.exId : g_shortcutObj.option.KeyR.dfId;
5085
5066
 
5086
5067
  if (g_settings.scrolls.length > 1) {
5087
- setReverseView(document.querySelector(`#btnReverse`));
5068
+ setReverseView(document.getElementById(`btnReverse`));
5088
5069
  }
5089
5070
  } else {
5090
5071
  g_settings.scrolls = structuredClone(g_keyObj.scrollName_def);
@@ -5157,7 +5138,7 @@ const createOptionWindow = _sprite => {
5157
5138
 
5158
5139
  if (_graphUseFlg) {
5159
5140
  const graphObj = document.createElement(`canvas`);
5160
- const textBaseObj = document.querySelector(`#lnkDifficulty`);
5141
+ const textBaseObj = document.getElementById(`lnkDifficulty`);
5161
5142
  const bkColor = window.getComputedStyle(textBaseObj, ``).backgroundColor;
5162
5143
 
5163
5144
  graphObj.id = `graph${_name}`;
@@ -5234,8 +5215,8 @@ const createOptionWindow = _sprite => {
5234
5215
  g_stateObj.scoreDetailViewFlg = false;
5235
5216
  g_shortcutObj.difSelector.KeyQ.id = g_settings.scoreDetailCursors[0];
5236
5217
  }
5237
- const scoreDetail = document.querySelector(`#scoreDetail`);
5238
- const detailObj = document.querySelector(`#detail${g_stateObj.scoreDetail}`);
5218
+ const scoreDetail = document.getElementById(`scoreDetail`);
5219
+ const detailObj = document.getElementById(`detail${g_stateObj.scoreDetail}`);
5239
5220
  const visibles = [`hidden`, `visible`];
5240
5221
 
5241
5222
  g_stateObj.scoreDetailViewFlg = !g_stateObj.scoreDetailViewFlg;
@@ -5355,7 +5336,7 @@ const createOptionWindow = _sprite => {
5355
5336
 
5356
5337
  );
5357
5338
 
5358
- const fadeinSlider = document.querySelector(`#fadeinSlider`);
5339
+ const fadeinSlider = document.getElementById(`fadeinSlider`);
5359
5340
  fadeinSlider.addEventListener(`input`, _ =>
5360
5341
  g_stateObj.fadein = inputSlider(fadeinSlider, lnkFadein), false);
5361
5342
 
@@ -5443,7 +5424,7 @@ const createGeneralSetting = (_obj, _settingName, { unitName = ``,
5443
5424
  createScText(_obj, settingUpper, { displayName: displayName, dfLabel: scLabel });
5444
5425
 
5445
5426
  } else {
5446
- document.querySelector(`#lbl${settingUpper}`).classList.add(g_cssObj.settings_Disabled);
5427
+ document.getElementById(`lbl${settingUpper}`).classList.add(g_cssObj.settings_Disabled);
5447
5428
  _obj.appendChild(makeDisabledLabel(linkId, 0, initName));
5448
5429
  }
5449
5430
  };
@@ -5497,7 +5478,7 @@ const setSetting = (_scrollNum, _settingName, _unitName = ``, _roundNum = 0) =>
5497
5478
  }
5498
5479
  g_stateObj[_settingName] = settingList[settingNum];
5499
5480
  g_settings[`${_settingName}Num`] = settingNum;
5500
- document.querySelector(`#lnk${toCapitalize(_settingName)}`).textContent =
5481
+ document.getElementById(`lnk${toCapitalize(_settingName)}`).textContent =
5501
5482
  `${getStgDetailName(g_stateObj[_settingName])}${_unitName}${g_localStorage[_settingName] === g_stateObj[_settingName] ? ' *' : ''}`;
5502
5483
  };
5503
5484
 
@@ -5507,11 +5488,10 @@ const setSetting = (_scrollNum, _settingName, _unitName = ``, _roundNum = 0) =>
5507
5488
  * @param {number} _heightPos
5508
5489
  * @param {string} _defaultStr
5509
5490
  */
5510
- const makeDisabledLabel = (_id, _heightPos, _defaultStr) => {
5511
- return createDivCss2Label(_id, _defaultStr, {
5491
+ const makeDisabledLabel = (_id, _heightPos, _defaultStr) =>
5492
+ createDivCss2Label(_id, _defaultStr, {
5512
5493
  x: g_limitObj.setLblLeft, y: g_limitObj.setLblHeight * _heightPos,
5513
5494
  }, g_cssObj.settings_Disabled);
5514
- };
5515
5495
 
5516
5496
  /**
5517
5497
  * 保存済みリバース取得処理
@@ -5769,7 +5749,7 @@ const getKeyCtrl = (_localStorage, _extraKeyName = ``) => {
5769
5749
  const basePtn = `${g_keyObj.currentKey}_${g_keyObj.storagePtn}`;
5770
5750
  const baseKeyNum = g_keyObj[`${g_keyObj.defaultProp}${basePtn}`].length;
5771
5751
 
5772
- if (_localStorage[`keyCtrl${_extraKeyName}`] !== undefined && _localStorage[`keyCtrl${_extraKeyName}`][0].length > 0) {
5752
+ if (_localStorage[`keyCtrl${_extraKeyName}`]?.[0].length > 0) {
5773
5753
  const prevPtn = g_keyObj.currentPtn;
5774
5754
  g_keyObj.currentPtn = -1;
5775
5755
  const copyPtn = `${g_keyObj.currentKey}_-1`;
@@ -5811,12 +5791,12 @@ const getKeyCtrl = (_localStorage, _extraKeyName = ``) => {
5811
5791
  */
5812
5792
  const makeSettingLblCssButton = (_id, _name, _heightPos, _func, { x, y, w, h, siz, cxtFunc = _ => true, ...rest } = {}, ..._classes) => {
5813
5793
  const tmpObj = {
5814
- x: x !== undefined ? x : g_limitObj.setLblLeft,
5815
- y: y !== undefined ? y : g_limitObj.setLblHeight * _heightPos,
5816
- w: w !== undefined ? w : g_limitObj.setLblWidth,
5817
- h: h !== undefined ? h : g_limitObj.setLblHeight,
5818
- siz: siz !== undefined ? siz : g_limitObj.setLblSiz,
5819
- cxtFunc: cxtFunc !== undefined ? cxtFunc : _ => true,
5794
+ x: x ?? g_limitObj.setLblLeft,
5795
+ y: y ?? g_limitObj.setLblHeight * _heightPos,
5796
+ w: w ?? g_limitObj.setLblWidth,
5797
+ h: h ?? g_limitObj.setLblHeight,
5798
+ siz: siz ?? g_limitObj.setLblSiz,
5799
+ cxtFunc: cxtFunc ?? (_ => true),
5820
5800
  };
5821
5801
  return createCss2Button(_id, _name, _func, { ...tmpObj, ...rest }, g_cssObj.button_Default, ..._classes);
5822
5802
  };
@@ -5828,14 +5808,13 @@ const makeSettingLblCssButton = (_id, _name, _heightPos, _func, { x, y, w, h, si
5828
5808
  * @param {number} _heightPos 上からの配置順
5829
5809
  * @param {function} _func
5830
5810
  */
5831
- const makeDifLblCssButton = (_id, _name, _heightPos, _func, { x = 0, w = g_limitObj.difSelectorWidth, btnStyle = `Default` } = {}) => {
5832
- return createCss2Button(_id, _name, _func, {
5833
- x: x, y: g_limitObj.setLblHeight * _heightPos,
5834
- w: w, h: g_limitObj.setLblHeight,
5811
+ const makeDifLblCssButton = (_id, _name, _heightPos, _func, { x = 0, w = g_limitObj.difSelectorWidth, btnStyle = `Default` } = {}) =>
5812
+ createCss2Button(_id, _name, _func, {
5813
+ x, y: g_limitObj.setLblHeight * _heightPos,
5814
+ w, h: g_limitObj.setLblHeight,
5835
5815
  siz: g_limitObj.difSelectorSiz,
5836
5816
  borderStyle: `solid`,
5837
5817
  }, g_cssObj[`button_${btnStyle}`], g_cssObj.button_ON);
5838
- };
5839
5818
 
5840
5819
  /**
5841
5820
  * 設定・オプション用の設定変更ミニボタン
@@ -5844,14 +5823,13 @@ const makeDifLblCssButton = (_id, _name, _heightPos, _func, { x = 0, w = g_limit
5844
5823
  * @param {number} _heightPos 上からの配置順
5845
5824
  * @param {function} _func
5846
5825
  */
5847
- const makeMiniCssButton = (_id, _directionFlg, _heightPos, _func, { dx = 0, dy = 0, dw = 0, dh = 0, dsiz = 0, visibility = `visible` } = {}) => {
5848
- return createCss2Button(`${_id}${_directionFlg}`, g_settingBtnObj.chara[_directionFlg], _func, {
5826
+ const makeMiniCssButton = (_id, _directionFlg, _heightPos, _func, { dx = 0, dy = 0, dw = 0, dh = 0, dsiz = 0, visibility = `visible` } = {}) =>
5827
+ createCss2Button(`${_id}${_directionFlg}`, g_settingBtnObj.chara[_directionFlg], _func, {
5849
5828
  x: g_settingBtnObj.pos[_directionFlg] + dx,
5850
5829
  y: g_limitObj.setLblHeight * _heightPos + dy,
5851
5830
  w: g_limitObj.setMiniWidth + dw, h: g_limitObj.setLblHeight + dh, siz: g_limitObj.setLblSiz + dsiz,
5852
5831
  visibility: visibility
5853
5832
  }, g_cssObj.button_Mini);
5854
- };
5855
5833
 
5856
5834
  /**
5857
5835
  * カラーグループ、シャッフルグループの再設定
@@ -5864,7 +5842,7 @@ const resetGroupList = (_type, _keyCtrlPtn) => {
5864
5842
  if (g_keyObj.currentPtn === -1) {
5865
5843
  g_keycons[`${_type}Groups`] = addValtoArray(g_keycons[`${_type}Groups`], -1);
5866
5844
  }
5867
- g_keycons[`${_type}GroupNum`] = (g_keyObj.currentPtn === -1 ? -1 : 0);
5845
+ g_keycons[`${_type}GroupNum`] = Math.min(g_keyObj.currentPtn, 0);
5868
5846
  while (g_keyObj[`${_type}${_keyCtrlPtn}_${k}`] !== undefined) {
5869
5847
  g_keycons[`${_type}Groups`].push(k);
5870
5848
  k++;
@@ -5878,7 +5856,7 @@ const resetGroupList = (_type, _keyCtrlPtn) => {
5878
5856
  const settingsDisplayInit = _ => {
5879
5857
 
5880
5858
  clearWindow(true);
5881
- const divRoot = document.querySelector(`#divRoot`);
5859
+ const divRoot = document.getElementById(`divRoot`);
5882
5860
  g_baseDisp = `Display`;
5883
5861
  g_currentPage = `settingsDisplay`;
5884
5862
 
@@ -5925,21 +5903,6 @@ const createSettingsDisplayWindow = _sprite => {
5925
5903
  const list = [C_FLG_OFF, C_FLG_ON];
5926
5904
  const linkId = `lnk${_name}`;
5927
5905
 
5928
- /**
5929
- * 無効化用ラベル作成
5930
- * @param {string} _id
5931
- * @param {number} _heightPos
5932
- * @param {number} _widthPos
5933
- * @param {string} _defaultStr
5934
- * @param {string} _flg
5935
- */
5936
- const makeDisabledDisplayLabel = (_id, _heightPos, _widthPos, _defaultStr, _flg) => {
5937
- return createDivCss2Label(_id, _defaultStr, {
5938
- x: 30 + 180 * _widthPos, y: 3 + g_limitObj.setLblHeight * _heightPos,
5939
- w: 170, siz: g_limitObj.difSelectorSiz,
5940
- }, g_cssObj[`button_Disabled${flg}`]);
5941
- };
5942
-
5943
5906
  if (g_headerObj[`${_name}Use`]) {
5944
5907
  const switchDisplay = evt => {
5945
5908
  const displayFlg = g_stateObj[`d_${_name.toLowerCase()}`];
@@ -5960,8 +5923,12 @@ const createSettingsDisplayWindow = _sprite => {
5960
5923
  createScText(document.getElementById(linkId), `${toCapitalize(_name)}`,
5961
5924
  { displayName: g_currentPage, targetLabel: linkId, x: -5 });
5962
5925
  } else {
5963
- displaySprite.appendChild(makeDisabledDisplayLabel(linkId, _heightPos, _widthPos,
5964
- g_lblNameObj[`d_${toCapitalize(_name)}`] + `:${g_headerObj[`${_name}Set`]}`, g_headerObj[`${_name}Set`]));
5926
+ displaySprite.appendChild(
5927
+ createDivCss2Label(linkId, g_lblNameObj[`d_${toCapitalize(_name)}`] + `:${g_headerObj[`${_name}Set`]}`, {
5928
+ x: 30 + 180 * _widthPos, y: 3 + g_limitObj.setLblHeight * _heightPos,
5929
+ w: 170, siz: g_limitObj.difSelectorSiz,
5930
+ }, g_cssObj[`button_Disabled${flg}`])
5931
+ );
5965
5932
  }
5966
5933
  };
5967
5934
 
@@ -6003,7 +5970,7 @@ const createSettingsDisplayWindow = _sprite => {
6003
5970
  g_cssObj[`button_Rev${g_stateObj.filterLock}`]);
6004
5971
  };
6005
5972
 
6006
- const appearanceSlider = document.querySelector(`#appearanceSlider`);
5973
+ const appearanceSlider = document.getElementById(`appearanceSlider`);
6007
5974
  appearanceSlider.addEventListener(`input`, _ =>
6008
5975
  g_hidSudObj.filterPos = inputSlider(appearanceSlider, lblAppearancePos), false);
6009
5976
 
@@ -6061,9 +6028,9 @@ const interlockingButton = (_headerObj, _name, _current, _next, _buttonFlg = fal
6061
6028
  let txtDisabled = ``;
6062
6029
  if (!g_headerObj[`${defaultOption}Use`]) {
6063
6030
  txtDisabled = `Disabled`;
6064
- document.querySelector(`#lnk${defaultOption}`).textContent = `${toCapitalize(defaultOption)}:${_next}`;
6031
+ document.getElementById(`lnk${defaultOption}`).textContent = `${toCapitalize(defaultOption)}:${_next}`;
6065
6032
  }
6066
- document.querySelector(`#lnk${defaultOption}`).classList.replace(g_cssObj[`button_${txtDisabled}${_current}`], g_cssObj[`button_Disabled${_next}`]);
6033
+ document.getElementById(`lnk${defaultOption}`).classList.replace(g_cssObj[`button_${txtDisabled}${_current}`], g_cssObj[`button_Disabled${_next}`]);
6067
6034
  }
6068
6035
  // さらに連動する場合は設定を反転
6069
6036
  interlockingButton(_headerObj, defaultOption, _next, _current, _buttonFlg);
@@ -6081,7 +6048,7 @@ const interlockingButton = (_headerObj, _name, _current, _next, _buttonFlg = fal
6081
6048
  const keyConfigInit = (_kcType = g_kcType) => {
6082
6049
 
6083
6050
  clearWindow(true);
6084
- const divRoot = document.querySelector(`#divRoot`);
6051
+ const divRoot = document.getElementById(`divRoot`);
6085
6052
  g_kcType = _kcType;
6086
6053
  g_currentPage = `keyConfig`;
6087
6054
 
@@ -6150,7 +6117,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
6150
6117
  * @param {string} _cssName
6151
6118
  */
6152
6119
  const changeKeyConfigColor = (_j, _k, _cssName) =>
6153
- changeConfigColor(document.querySelector(`#keycon${_j}_${_k}`), _cssName);
6120
+ changeConfigColor(document.getElementById(`keycon${_j}_${_k}`), _cssName);
6154
6121
 
6155
6122
  /**
6156
6123
  * 一時的に矢印色・シャッフルグループを変更(共通処理)
@@ -6741,7 +6708,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
6741
6708
  const j = g_keycons.cursorNumList[m];
6742
6709
  for (let k = 0; k < g_keyObj[`keyCtrl${keyCtrlPtn}`][j].length; k++) {
6743
6710
  g_keyObj[`keyCtrl${keyCtrlPtn}`][j][k] = setIntVal(g_keyObj[`keyCtrl${keyCtrlPtn}d`][j][k]);
6744
- document.querySelector(`#keycon${j}_${k}`).textContent = g_kCd[g_keyObj[`keyCtrl${keyCtrlPtn}`][j][k]];
6711
+ document.getElementById(`keycon${j}_${k}`).textContent = g_kCd[g_keyObj[`keyCtrl${keyCtrlPtn}`][j][k]];
6745
6712
  changeKeyConfigColor(j, k, g_keyObj.currentPtn === -1 ? g_cssObj.keyconfig_Defaultkey : g_cssObj.title_base);
6746
6713
  }
6747
6714
  }
@@ -6756,7 +6723,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
6756
6723
 
6757
6724
  // キーボード押下時処理
6758
6725
  setShortcutEvent(g_currentPage, (kbCode, kbKey) => {
6759
- const keyCdObj = document.querySelector(`#keycon${g_currentj}_${g_currentk}`);
6726
+ const keyCdObj = document.getElementById(`keycon${g_currentj}_${g_currentk}`);
6760
6727
  let setKey = g_kCdN.findIndex(kCd => kCd === kbCode);
6761
6728
 
6762
6729
  // 右シフトキー対応
@@ -6779,7 +6746,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
6779
6746
  return;
6780
6747
  }
6781
6748
 
6782
- if (setKey === C_KEY_RETRY && (!g_isMac || (g_isMac && g_currentk === 0))) {
6749
+ if (setKey === C_KEY_RETRY && (!g_isMac || g_currentk === 0)) {
6783
6750
  // スキップ
6784
6751
  } else {
6785
6752
  // キー割り当て処理
@@ -6826,8 +6793,7 @@ const getShadowColor = (_colorPos, _arrowColor) => g_headerObj.setShadowColor[_c
6826
6793
  const getKeyInfo = _ => {
6827
6794
  const keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`;
6828
6795
  const keyNum = g_keyObj[`${g_keyObj.defaultProp}${keyCtrlPtn}`].length;
6829
- const posMax = (g_keyObj[`divMax${keyCtrlPtn}`] !== undefined ?
6830
- g_keyObj[`divMax${keyCtrlPtn}`] : Math.max(...g_keyObj[`pos${keyCtrlPtn}`]) + 1);
6796
+ const posMax = g_keyObj[`divMax${keyCtrlPtn}`] ?? Math.max(...g_keyObj[`pos${keyCtrlPtn}`]) + 1;
6831
6797
  const divideCnt = g_keyObj[`div${keyCtrlPtn}`] - 1;
6832
6798
  const keyGroupMaps = setVal(g_keyObj[`keyGroup${keyCtrlPtn}`], [...Array(keyNum)].fill([`0`]), C_TYP_STRING);
6833
6799
  const keyGroupList = makeDedupliArray(keyGroupMaps.flat()).sort((a, b) => parseInt(a) - parseInt(b));
@@ -6953,7 +6919,7 @@ const loadMusic = _ => {
6953
6919
 
6954
6920
  // 進捗時
6955
6921
  request.addEventListener(`progress`, _event => {
6956
- const lblLoading = document.querySelector(`#lblLoading`);
6922
+ const lblLoading = document.getElementById(`lblLoading`);
6957
6923
 
6958
6924
  if (_event.lengthComputable) {
6959
6925
  const rate = _event.loaded / _event.total;
@@ -6967,8 +6933,8 @@ const loadMusic = _ => {
6967
6933
  });
6968
6934
 
6969
6935
  // エラー処理
6970
- request.addEventListener(`timeout`, _ => makeWarningWindow(`${g_msgInfoObj.E_0033}`, { backBtnUse: true }));
6971
- request.addEventListener(`error`, _ => makeWarningWindow(`${g_msgInfoObj.E_0034}`, { backBtnUse: true }));
6936
+ request.addEventListener(`timeout`, _ => makeWarningWindow(g_msgInfoObj.E_0033, { backBtnUse: true }));
6937
+ request.addEventListener(`error`, _ => makeWarningWindow(g_msgInfoObj.E_0034, { backBtnUse: true }));
6972
6938
 
6973
6939
  request.send();
6974
6940
  };
@@ -7147,12 +7113,8 @@ const loadingScoreInit = async () => {
7147
7113
  // シャッフルグループを扱いやすくする
7148
7114
  // [0, 0, 0, 1, 0, 0, 0] -> [[0, 1, 2, 4, 5, 6], [3]]
7149
7115
  const shuffleGroupMap = {};
7150
- g_keyObj[`shuffle${keyCtrlPtn}`].forEach((_val, _i) => {
7151
- if (shuffleGroupMap[_val] === undefined) {
7152
- shuffleGroupMap[_val] = [];
7153
- }
7154
- shuffleGroupMap[_val].push(_i);
7155
- });
7116
+ g_keyObj[`shuffle${keyCtrlPtn}`].forEach((_val, _i) =>
7117
+ shuffleGroupMap[_val]?.push(_i) || (shuffleGroupMap[_val] = [_i]));
7156
7118
 
7157
7119
  // Mirror,Random,S-Randomの適用
7158
7120
  g_shuffleFunc[g_stateObj.shuffle](keyNum, Object.values(shuffleGroupMap));
@@ -7907,7 +7869,7 @@ const setSpeedOnFrame = (_speedData, _lastFrame) => {
7907
7869
  let currentSpeed = g_stateObj.speed * 2;
7908
7870
 
7909
7871
  for (let frm = 0, s = 0; frm <= _lastFrame; frm++) {
7910
- while (_speedData !== undefined && frm >= _speedData[s]) {
7872
+ while (frm >= _speedData?.[s]) {
7911
7873
  currentSpeed = _speedData[s + 1] * g_stateObj.speed * 2;
7912
7874
  s += 2;
7913
7875
  }
@@ -7992,11 +7954,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
7992
7954
 
7993
7955
  const setNotes = (_j, _k, _data, _startPoint, _header, _frzFlg = false) => {
7994
7956
  if (_startPoint >= 0) {
7995
- if (g_workObj[`mk${_header}Arrow`][_startPoint] === undefined) {
7996
- g_workObj[`mk${_header}Arrow`][_startPoint] = [];
7997
- }
7998
- g_workObj[`mk${_header}Arrow`][_startPoint].push(_j);
7999
-
7957
+ g_workObj[`mk${_header}Arrow`][_startPoint]?.push(_j) || (g_workObj[`mk${_header}Arrow`][_startPoint] = [_j]);
8000
7958
  if (_frzFlg) {
8001
7959
  g_workObj[`mk${_header}Length`][_j][_k] = getFrzLength(_speedOnFrame, _data[_k], _data[_k + 1]);
8002
7960
  }
@@ -8239,12 +8197,10 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
8239
8197
  g_workObj.speedData.push(g_scoreObj.frameNum);
8240
8198
  g_workObj.speedData.push(_speedOnFrame[g_scoreObj.frameNum]);
8241
8199
 
8242
- if (_dataObj.speedData !== undefined) {
8243
- for (let k = 0; k < _dataObj.speedData.length; k += 2) {
8244
- if (_dataObj.speedData[k] >= g_scoreObj.frameNum) {
8245
- g_workObj.speedData.push(_dataObj.speedData[k]);
8246
- g_workObj.speedData.push(_speedOnFrame[_dataObj.speedData[k]]);
8247
- }
8200
+ for (let k = 0; k < _dataObj?.speedData.length; k += 2) {
8201
+ if (_dataObj.speedData[k] >= g_scoreObj.frameNum) {
8202
+ g_workObj.speedData.push(_dataObj.speedData[k]);
8203
+ g_workObj.speedData.push(_speedOnFrame[_dataObj.speedData[k]]);
8248
8204
  }
8249
8205
  }
8250
8206
  };
@@ -8334,17 +8290,6 @@ const pushColors = (_header, _frame, _val, _colorCd, _allFlg) => {
8334
8290
  const addAll = Number(_allFlg) * 1000;
8335
8291
  const allUseTypes = [];
8336
8292
 
8337
- /**
8338
- * 色変化用配列(フレーム別)の初期化
8339
- * @param {string} _baseStr
8340
- */
8341
- const initialize = (_baseStr) => {
8342
- if (g_workObj[_baseStr][_frame] === undefined) {
8343
- g_workObj[_baseStr][_frame] = [];
8344
- g_workObj[`${_baseStr}Cd`][_frame] = [];
8345
- }
8346
- };
8347
-
8348
8293
  /**
8349
8294
  * 全体色変化の有効化(フレーム別)
8350
8295
  * @param {...any} _types
@@ -8361,8 +8306,8 @@ const pushColors = (_header, _frame, _val, _colorCd, _allFlg) => {
8361
8306
  * @param {number} _cVal
8362
8307
  */
8363
8308
  const pushColor = (_baseStr, _cVal) => {
8364
- g_workObj[_baseStr][_frame].push(_cVal);
8365
- g_workObj[`${_baseStr}Cd`][_frame].push(colorCd);
8309
+ g_workObj[_baseStr][_frame]?.push(_cVal) || (g_workObj[_baseStr][_frame] = [_cVal]);
8310
+ g_workObj[`${_baseStr}Cd`][_frame]?.push(colorCd) || (g_workObj[`${_baseStr}Cd`][_frame] = [colorCd]);
8366
8311
  };
8367
8312
 
8368
8313
  if (_val < 30 || _val >= 1000) {
@@ -8378,8 +8323,6 @@ const pushColors = (_header, _frame, _val, _colorCd, _allFlg) => {
8378
8323
 
8379
8324
  // 矢印の色変化 (追随指定時はフリーズアローも色変化)
8380
8325
  baseHeaders.forEach(baseHeader => {
8381
- initialize(baseHeader);
8382
-
8383
8326
  if (_val < 20 || _val >= 1000) {
8384
8327
  pushColor(baseHeader, g_workObj.replaceNums[_val % 1000] + addAll);
8385
8328
  } else if (_val >= 20) {
@@ -8417,7 +8360,6 @@ const pushColors = (_header, _frame, _val, _colorCd, _allFlg) => {
8417
8360
 
8418
8361
  g_keyObj[`color${tkObj.keyCtrlPtn}`].forEach((cpattern, k) => {
8419
8362
  if (colorPos === cpattern) {
8420
- initialize(baseHeader + ctype);
8421
8363
  pushColor(baseHeader + ctype, k + addAll);
8422
8364
  }
8423
8365
  });
@@ -8474,30 +8416,24 @@ const pushScrollchs = (_header, _frameArrow, _val, _frameStep, _scrollDir) => {
8474
8416
 
8475
8417
  const frameArrow = Math.max(_frameArrow, g_scoreObj.frameNum);
8476
8418
  const frameStep = Math.max(_frameStep, g_scoreObj.frameNum);
8419
+ const pushData = (_pattern, _frame, _val) =>
8420
+ g_workObj[`mkScrollch${_pattern}`][_frame]?.push(_val) || (g_workObj[`mkScrollch${_pattern}`][_frame] = [_val]);
8477
8421
 
8478
- if (g_workObj.mkScrollchArrow[frameArrow] === undefined) {
8479
- g_workObj.mkScrollchArrow[frameArrow] = [];
8480
- g_workObj.mkScrollchArrowDir[frameArrow] = [];
8481
- }
8482
- if (g_workObj.mkScrollchStep[frameStep] === undefined) {
8483
- g_workObj.mkScrollchStep[frameStep] = [];
8484
- g_workObj.mkScrollchStepDir[frameStep] = [];
8485
- }
8486
8422
  if (_val < 20 || _val >= 1000) {
8487
8423
  const realVal = g_workObj.replaceNums[_val % 1000];
8488
- g_workObj.mkScrollchArrow[frameArrow].push(realVal);
8489
- g_workObj.mkScrollchArrowDir[frameArrow].push(_scrollDir);
8490
- g_workObj.mkScrollchStep[frameStep].push(realVal);
8491
- g_workObj.mkScrollchStepDir[frameStep].push(_scrollDir);
8424
+ pushData(`Arrow`, frameArrow, realVal);
8425
+ pushData(`ArrowDir`, frameArrow, _scrollDir);
8426
+ pushData(`Step`, frameStep, realVal);
8427
+ pushData(`StepDir`, frameStep, _scrollDir);
8492
8428
 
8493
8429
  } else {
8494
8430
  const colorNum = _val - 20;
8495
8431
  for (let j = 0; j < tkObj.keyNum; j++) {
8496
8432
  if (g_keyObj[`color${tkObj.keyCtrlPtn}`][j] === colorNum) {
8497
- g_workObj.mkScrollchArrow[frameArrow].push(j);
8498
- g_workObj.mkScrollchArrowDir[frameArrow].push(_scrollDir);
8499
- g_workObj.mkScrollchStep[frameStep].push(j);
8500
- g_workObj.mkScrollchStepDir[frameStep].push(_scrollDir);
8433
+ pushData(`Arrow`, frameArrow, j);
8434
+ pushData(`ArrowDir`, frameArrow, _scrollDir);
8435
+ pushData(`Step`, frameStep, j);
8436
+ pushData(`StepDir`, frameStep, _scrollDir);
8501
8437
  }
8502
8438
  }
8503
8439
  }
@@ -8566,8 +8502,7 @@ const getArrowSettings = _ => {
8566
8502
  // モーション管理
8567
8503
  g_typeLists.arrow.forEach(type => g_workObj[`${type}CssMotions`] = [...Array(keyNum)].fill(``));
8568
8504
 
8569
- const scrollDirOptions = (g_keyObj[`scrollDir${keyCtrlPtn}`] !== undefined ?
8570
- g_keyObj[`scrollDir${keyCtrlPtn}`][g_stateObj.scroll] : [...Array(keyNum)].fill(1));
8505
+ const scrollDirOptions = g_keyObj[`scrollDir${keyCtrlPtn}`]?.[g_stateObj.scroll] ?? [...Array(keyNum)].fill(1);
8571
8506
 
8572
8507
  g_stateObj.autoAll = boolToSwitch(g_stateObj.autoPlay === C_FLG_ALL);
8573
8508
  g_workObj.hitPosition = (g_stateObj.autoAll === C_FLG_ON ? 0 : g_stateObj.hitPosition);
@@ -8713,7 +8648,7 @@ const setKeyCtrl = (_localStorage, _keyNum, _keyCtrlPtn) => {
8713
8648
  */
8714
8649
  const mainInit = _ => {
8715
8650
  clearWindow(true, `Main`);
8716
- const divRoot = document.querySelector(`#divRoot`);
8651
+ const divRoot = document.getElementById(`divRoot`);
8717
8652
  document.oncontextmenu = _ => false;
8718
8653
  g_currentPage = `main`;
8719
8654
 
@@ -8899,31 +8834,27 @@ const mainInit = _ => {
8899
8834
  g_scoreObj.fadeOutTerm = C_FRM_AFTERFADE;
8900
8835
 
8901
8836
  // フェードアウト時間指定の場合、その7秒(=420フレーム)後に終了する
8902
- if (g_headerObj.fadeFrame !== undefined) {
8903
- let fadeNo = -1;
8904
- if (g_headerObj.fadeFrame.length >= g_stateObj.scoreId + 1) {
8905
- fadeNo = (isNaN(parseInt(g_headerObj.fadeFrame[g_stateObj.scoreId][0])) ? -1 : g_stateObj.scoreId);
8906
- }
8907
- if (fadeNo !== -1) {
8908
- // フェードアウト指定の場合、曲長(フェードアウト開始まで) FadeFrame - (本来のblankFrame)
8909
- duration = parseInt(g_headerObj.fadeFrame[fadeNo][0]) - g_headerObj.blankFrameDef;
8910
- g_scoreObj.fadeOutFrame = Math.ceil(duration / g_headerObj.playbackRate + g_headerObj.blankFrame + g_stateObj.adjustment);
8837
+ let fadeNo = -1;
8838
+ if (g_headerObj.fadeFrame?.length >= g_stateObj.scoreId + 1) {
8839
+ fadeNo = (isNaN(parseInt(g_headerObj.fadeFrame[g_stateObj.scoreId][0])) ? -1 : g_stateObj.scoreId);
8840
+ }
8841
+ if (fadeNo !== -1) {
8842
+ // フェードアウト指定の場合、曲長(フェードアウト開始まで)は FadeFrame - (本来のblankFrame)
8843
+ duration = parseInt(g_headerObj.fadeFrame[fadeNo][0]) - g_headerObj.blankFrameDef;
8844
+ g_scoreObj.fadeOutFrame = Math.ceil(duration / g_headerObj.playbackRate + g_headerObj.blankFrame + g_stateObj.adjustment);
8911
8845
 
8912
- if (g_headerObj.fadeFrame[fadeNo].length > 1) {
8913
- g_scoreObj.fadeOutTerm = Number(g_headerObj.fadeFrame[fadeNo][1]);
8914
- }
8846
+ if (g_headerObj.fadeFrame[fadeNo].length > 1) {
8847
+ g_scoreObj.fadeOutTerm = Number(g_headerObj.fadeFrame[fadeNo][1]);
8915
8848
  }
8916
8849
  }
8917
8850
 
8918
8851
  // 終了時間指定の場合、その値を適用する
8919
8852
  let endFrameUseFlg = false;
8920
- if (g_headerObj.endFrame !== undefined) {
8921
- const tmpEndFrame = g_headerObj.endFrame[g_stateObj.scoreId] || g_headerObj.endFrame[0];
8922
- if (!isNaN(parseInt(tmpEndFrame))) {
8923
- // 終了時間指定の場合、曲長は EndFrame - (本来のblankFrame)
8924
- duration = parseInt(tmpEndFrame) - g_headerObj.blankFrameDef;
8925
- endFrameUseFlg = true;
8926
- }
8853
+ const tmpEndFrame = g_headerObj.endFrame?.[g_stateObj.scoreId] || g_headerObj.endFrame?.[0];
8854
+ if (!isNaN(parseInt(tmpEndFrame))) {
8855
+ // 終了時間指定の場合、曲長は EndFrame - (本来のblankFrame)
8856
+ duration = parseInt(tmpEndFrame) - g_headerObj.blankFrameDef;
8857
+ endFrameUseFlg = true;
8927
8858
  }
8928
8859
 
8929
8860
  let fullFrame = Math.ceil(duration / g_headerObj.playbackRate + g_headerObj.blankFrame + g_stateObj.adjustment);
@@ -9100,14 +9031,14 @@ const mainInit = _ => {
9100
9031
 
9101
9032
  // Ready?表示
9102
9033
  if (!g_headerObj.customReadyUse) {
9103
- const readyColor = (g_headerObj.readyColor !== `` ? g_headerObj.readyColor : g_headerObj.setColorOrg[0]);
9034
+ const readyColor = g_headerObj.readyColor || g_headerObj.setColorOrg[0];
9104
9035
  let readyDelayFrame = 0;
9105
9036
  if (g_stateObj.fadein === 0 && g_headerObj.readyDelayFrame > 0 &&
9106
9037
  g_headerObj.readyDelayFrame + g_stateObj.adjustment > 0) {
9107
9038
  readyDelayFrame = g_headerObj.readyDelayFrame + g_stateObj.adjustment;
9108
9039
  }
9109
- const readyHtml = (g_headerObj.readyHtml !== `` ? g_headerObj.readyHtml :
9110
- `<span style='color:${readyColor};font-size:${wUnit(60)};'>R</span>EADY<span style='font-size:${wUnit(50)};'>?</span>`);
9040
+ const readyHtml = g_headerObj.readyHtml ||
9041
+ `<span style='color:${readyColor};font-size:${wUnit(60)};'>R</span>EADY<span style='font-size:${wUnit(50)};'>?</span>`;
9111
9042
 
9112
9043
  divRoot.appendChild(
9113
9044
  createDivCss2Label(`lblReady`, readyHtml, {
@@ -9134,7 +9065,7 @@ const mainInit = _ => {
9134
9065
  const mainKeyDownActFunc = {
9135
9066
 
9136
9067
  OFF: (_code, _key) => {
9137
- const convCode = (_code === `` ? (_key === `Shift` ? g_kCdNameObj.shiftRKey : g_kCdNameObj.unknownKey) : _code);
9068
+ const convCode = _code || (_key === `Shift` ? g_kCdNameObj.shiftRKey : g_kCdNameObj.unknownKey);
9138
9069
  const matchKeys = g_workObj.keyCtrlN;
9139
9070
 
9140
9071
  for (let j = 0; j < keyNum; j++) {
@@ -9234,7 +9165,7 @@ const mainInit = _ => {
9234
9165
  if (g_workObj[`mk${toCapitalize(_name)}ColorChangeAll`][g_scoreObj.frameNum]) {
9235
9166
  const colorSelf = g_workObj[`${_name}Colors`][_j];
9236
9167
  const colorAll = g_workObj[`${_name}ColorsAll`][_j];
9237
- const arrowTop = document.querySelector(`#${_name}Top${_j}_${_k}`);
9168
+ const arrowTop = document.getElementById(`${_name}Top${_j}_${_k}`);
9238
9169
 
9239
9170
  if (arrowTop.getAttribute(`color`) !== colorSelf && colorAll === colorSelf) {
9240
9171
  arrowTop.style.background = colorAll;
@@ -9253,9 +9184,9 @@ const mainInit = _ => {
9253
9184
  const changeFrzColor = (_j, _k, _name, _state) => {
9254
9185
 
9255
9186
  if (g_workObj[`mk${toCapitalize(_name)}ColorChangeAll`][g_scoreObj.frameNum]) {
9256
- const frzTop = document.querySelector(`#${_name}Top${_j}_${_k}`);
9257
- const frzBar = document.querySelector(`#${_name}Bar${_j}_${_k}`);
9258
- const frzBtm = document.querySelector(`#${_name}Btm${_j}_${_k}`);
9187
+ const frzTop = document.getElementById(`${_name}Top${_j}_${_k}`);
9188
+ const frzBar = document.getElementById(`${_name}Bar${_j}_${_k}`);
9189
+ const frzBtm = document.getElementById(`${_name}Btm${_j}_${_k}`);
9259
9190
  const frzName = `${_name}${_state}`;
9260
9191
 
9261
9192
  // 矢印部分の色変化
@@ -9330,7 +9261,7 @@ const mainInit = _ => {
9330
9261
  // 矢印(オート、AutoPlay: ON)
9331
9262
  arrowON: (_j, _arrowName, _cnt) => {
9332
9263
  if (_cnt === 0) {
9333
- const stepDivHit = document.querySelector(`#stepHit${_j}`);
9264
+ const stepDivHit = document.getElementById(`stepHit${_j}`);
9334
9265
 
9335
9266
  judgeIi(_cnt);
9336
9267
  stepDivHit.style.opacity = 1;
@@ -9342,7 +9273,7 @@ const mainInit = _ => {
9342
9273
  // ダミー矢印(オート、AutoPlay: OFF)
9343
9274
  dummyArrowOFF: (_j, _arrowName, _cnt) => {
9344
9275
  if (_cnt === 0) {
9345
- const stepDivHit = document.querySelector(`#stepHit${_j}`);
9276
+ const stepDivHit = document.getElementById(`stepHit${_j}`);
9346
9277
 
9347
9278
  g_customJsObj.dummyArrow.forEach(func => func());
9348
9279
  stepDivHit.style.top = wUnit(-15);
@@ -9759,11 +9690,11 @@ const mainInit = _ => {
9759
9690
  g_customJsObj.mainEnterFrame.forEach(func => func());
9760
9691
 
9761
9692
  // 速度変化 (途中変速, 個別加速)
9762
- while (g_workObj.speedData !== undefined && currentFrame >= g_workObj.speedData[speedCnts]) {
9693
+ while (currentFrame >= g_workObj.speedData?.[speedCnts]) {
9763
9694
  g_workObj.currentSpeed = g_workObj.speedData[speedCnts + 1];
9764
9695
  speedCnts += 2;
9765
9696
  }
9766
- while (g_workObj.boostData !== undefined && currentFrame >= g_workObj.boostData[boostCnts]) {
9697
+ while (currentFrame >= g_workObj.boostData?.[boostCnts]) {
9767
9698
  g_workObj.boostSpd = g_workObj.boostData[boostCnts + 1];
9768
9699
  g_workObj.boostDir = (g_workObj.boostSpd > 0 ? 1 : -1);
9769
9700
  boostCnts += 2;
@@ -9819,7 +9750,7 @@ const mainInit = _ => {
9819
9750
 
9820
9751
  // 矢印・フリーズアロー移動&消去
9821
9752
  for (let j = 0; j < keyNum; j++) {
9822
- const stepDivHit = document.querySelector(`#stepHit${j}`);
9753
+ const stepDivHit = document.getElementById(`stepHit${j}`);
9823
9754
 
9824
9755
  // ダミー矢印
9825
9756
  for (let k = g_workObj.judgDummyArrowCnt[j]; k <= dummyArrowCnts[j]; k++) {
@@ -9855,7 +9786,7 @@ const mainInit = _ => {
9855
9786
  g_scoreObj.wordData[currentFrame]?.forEach(tmpObj => {
9856
9787
  g_wordObj.wordDir = tmpObj[0];
9857
9788
  g_wordObj.wordDat = tmpObj[1];
9858
- g_wordSprite = document.querySelector(`#lblword${g_wordObj.wordDir}`);
9789
+ g_wordSprite = document.getElementById(`lblword${g_wordObj.wordDir}`);
9859
9790
 
9860
9791
  const wordDepth = Number(g_wordObj.wordDir);
9861
9792
  if (g_wordObj.wordDat.substring(0, 5) === `[fade`) {
@@ -9901,13 +9832,13 @@ const mainInit = _ => {
9901
9832
 
9902
9833
  // 判定キャラクタ消去
9903
9834
  jdgGroups.forEach(jdg => {
9904
- let charaJCnt = document.querySelector(`#chara${jdg}`).getAttribute(`cnt`);
9835
+ let charaJCnt = document.getElementById(`chara${jdg}`).getAttribute(`cnt`);
9905
9836
  if (charaJCnt > 0) {
9906
- document.querySelector(`#chara${jdg}`).setAttribute(`cnt`, --charaJCnt);
9837
+ document.getElementById(`chara${jdg}`).setAttribute(`cnt`, --charaJCnt);
9907
9838
  if (charaJCnt === 0) {
9908
- document.querySelector(`#chara${jdg}`).textContent = ``;
9909
- document.querySelector(`#combo${jdg}`).textContent = ``;
9910
- document.querySelector(`#diff${jdg}`).textContent = ``;
9839
+ document.getElementById(`chara${jdg}`).textContent = ``;
9840
+ document.getElementById(`combo${jdg}`).textContent = ``;
9841
+ document.getElementById(`diff${jdg}`).textContent = ``;
9911
9842
  }
9912
9843
  }
9913
9844
  });
@@ -10209,7 +10140,7 @@ const judgeArrow = _j => {
10209
10140
  const judgeTargetArrow = _difFrame => {
10210
10141
  const _difCnt = Math.abs(_difFrame);
10211
10142
  const stepHitTargetArrow = _resultJdg => {
10212
- const stepDivHit = document.querySelector(`#stepHit${_j}`);
10143
+ const stepDivHit = document.getElementById(`stepHit${_j}`);
10213
10144
  stepDivHit.style.top = wUnit(currentArrow.prevY - parseFloat($id(`stepRoot${_j}`).top) - 15 + g_workObj.hitPosition * g_workObj.scrollDir[_j]);
10214
10145
  stepDivHit.style.opacity = 0.75;
10215
10146
  stepDivHit.classList.value = ``;
@@ -10306,8 +10237,8 @@ const displayDiff = (_difFrame, _fjdg = ``, _justFrames = g_headerObj.justFrames
10306
10237
  * @param {string} _state
10307
10238
  */
10308
10239
  const changeLifeColor = (_state = ``) => {
10309
- const lblLife = document.querySelector(`#lblLife`);
10310
- const lifeBar = document.querySelector(`#lifeBar`);
10240
+ const lblLife = document.getElementById(`lblLife`);
10241
+ const lifeBar = document.getElementById(`lifeBar`);
10311
10242
  if (_state !== ``) {
10312
10243
  const lifeCss = g_cssObj[`life_${_state}`];
10313
10244
  lblLife.classList.remove(g_cssObj.life_Max, g_cssObj.life_Cleared, g_cssObj.life_Failed);
@@ -10357,9 +10288,9 @@ const lifeDamage = (_excessive = false) => {
10357
10288
  const changeJudgeCharacter = (_name, _character, _fjdg = ``) => {
10358
10289
  g_resultObj[_name]++;
10359
10290
  g_currentArrows++;
10360
- document.querySelector(`#chara${_fjdg}J`).innerHTML = `<span class="common_${_name}">${_character}</span>`;
10361
- document.querySelector(`#chara${_fjdg}J`).setAttribute(`cnt`, C_FRM_JDGMOTION);
10362
- document.querySelector(`#lbl${toCapitalize(_name)}`).textContent = g_resultObj[_name];
10291
+ document.getElementById(`chara${_fjdg}J`).innerHTML = `<span class="common_${_name}">${_character}</span>`;
10292
+ document.getElementById(`chara${_fjdg}J`).setAttribute(`cnt`, C_FRM_JDGMOTION);
10293
+ document.getElementById(`lbl${toCapitalize(_name)}`).textContent = g_resultObj[_name];
10363
10294
  };
10364
10295
 
10365
10296
  /**
@@ -10489,7 +10420,7 @@ const makeFinishView = _text => {
10489
10420
  finishView.innerHTML = _text;
10490
10421
  finishView.style.opacity = 1;
10491
10422
  [`charaJ`, `comboJ`, `diffJ`, `charaFJ`, `comboFJ`, `diffFJ`].forEach(label =>
10492
- document.querySelector(`#${label}`).textContent = ``);
10423
+ document.getElementById(label).textContent = ``);
10493
10424
  };
10494
10425
 
10495
10426
  const finishViewing = _ => {
@@ -10528,7 +10459,7 @@ const resultInit = _ => {
10528
10459
  g_scoreObj[`${sprite}ResultLoopCount`] = 0;
10529
10460
  });
10530
10461
 
10531
- const divRoot = document.querySelector(`#divRoot`);
10462
+ const divRoot = document.getElementById(`divRoot`);
10532
10463
 
10533
10464
  // 曲時間制御変数
10534
10465
  let thisTime;
@@ -10789,7 +10720,7 @@ const resultInit = _ => {
10789
10720
 
10790
10721
  } else {
10791
10722
  resultWindow.appendChild(makeCssResultSymbol(`lblAutoView`, 215, g_cssObj.result_noRecord, 4, `(No Record)`));
10792
- const lblAutoView = document.querySelector(`#lblAutoView`);
10723
+ const lblAutoView = document.getElementById(`lblAutoView`);
10793
10724
  lblAutoView.style.fontSize = wUnit(20);
10794
10725
  }
10795
10726
 
@@ -10822,8 +10753,8 @@ const resultInit = _ => {
10822
10753
  jdgScore.pos, `)`),
10823
10754
  );
10824
10755
  } else {
10825
- document.querySelector(`#lbl${jdgScore.id}L1`).textContent = `(${highscoreDfObj[score] >= 0 ? "+" : "-"}`;
10826
- document.querySelector(`#lbl${jdgScore.id}LS`).textContent = Math.abs(highscoreDfObj[score]);
10756
+ document.getElementById(`lbl${jdgScore.id}L1`).textContent = `(${highscoreDfObj[score] >= 0 ? "+" : "-"}`;
10757
+ document.getElementById(`lbl${jdgScore.id}LS`).textContent = Math.abs(highscoreDfObj[score]);
10827
10758
  }
10828
10759
  });
10829
10760
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "34.4.1",
3
+ "version": "34.4.2",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "index.js",
6
6
  "scripts": {