danoniplus 39.7.2 → 39.8.0

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.
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 : 2025/02/20
7
+ * Revised : 2025/02/21
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 39.7.2`;
12
- const g_revisedDate = `2025/02/20`;
11
+ const g_version = `Ver 39.8.0`;
12
+ const g_revisedDate = `2025/02/21`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -517,7 +517,11 @@ const formatObject = (_obj, _indent = 0, { seen = new WeakSet(), colorFmt = true
517
517
  return `<br>${nestedIndent}"${key}": ${formattedValue}`;
518
518
  }).join(`,`);
519
519
 
520
- return `{${formattedEntries}<br>${baseIndent}}`;
520
+ let result = `{${formattedEntries}<br>${baseIndent}}`;
521
+ if (!colorFmt) {
522
+ result = result.replaceAll(`<br>`, `\r\n`).replaceAll(`&nbsp;`, ` `);
523
+ }
524
+ return result;
521
525
  }
522
526
 
523
527
  /**
@@ -4819,6 +4823,7 @@ const dataMgtInit = () => {
4819
4823
  clearWindow(true);
4820
4824
  const prevPage = g_currentPage;
4821
4825
  g_currentPage = `dataMgt`;
4826
+ let selectedKey = g_keyObj.currentKey;
4822
4827
 
4823
4828
  multiAppend(divRoot,
4824
4829
 
@@ -4887,17 +4892,28 @@ const dataMgtInit = () => {
4887
4892
  createMgtButton(`customKey`, 3.5, 0),
4888
4893
  createMgtButton(`others`, 4.5, 0),
4889
4894
  createMgtLabel(`keyData`, 6),
4890
- createDivCss2Label(`lblTargetKey`, `(${getKeyName(g_headerObj.keyLabels[0])})`, {
4895
+ createDivCss2Label(`lblTargetKey`, `(${getKeyName(selectedKey)})`, {
4891
4896
  x: 90, y: g_limitObj.setLblHeight * 6 + 40,
4892
4897
  siz: g_limitObj.setLblSiz, align: C_ALIGN_LEFT,
4893
4898
  })
4894
4899
  );
4895
4900
 
4896
4901
  g_localStorageMgt = parseStorageData(g_localStorageUrl);
4902
+
4897
4903
  multiAppend(divRoot,
4904
+
4905
+ // 保存データの表示
4898
4906
  createDivCss2Label(`lblWorkDataView`,
4899
4907
  viewKeyStorage(`workStorage`), g_lblPosObj.lblWorkDataView),
4900
- createDivCss2Label(`lblKeyDataView`, viewKeyStorage(`keyStorage`, g_headerObj.keyLabels[0]), g_lblPosObj.lblKeyDataView),
4908
+ createDivCss2Label(`lblKeyDataView`, viewKeyStorage(`keyStorage`, selectedKey), g_lblPosObj.lblKeyDataView),
4909
+
4910
+ // 保存データの出力ボタン
4911
+ createCss2Button(`btnWorkStorage`, g_lblNameObj.b_copyStorage, () =>
4912
+ copyTextToClipboard(formatObject(g_storageFunc.get(`workStorage`)(), 0, { colorFmt: false }), g_msgInfoObj.I_0006),
4913
+ g_lblPosObj.btnWorkStorage, g_cssObj.button_Default, g_cssObj.button_ON),
4914
+ createCss2Button(`btnKeyStorage`, g_lblNameObj.b_copyStorage, () =>
4915
+ copyTextToClipboard(formatObject(g_storageFunc.get(`keyStorage`)(selectedKey), 0, { colorFmt: false }), g_msgInfoObj.I_0006),
4916
+ g_lblPosObj.btnKeyStorage, g_cssObj.button_Default, g_cssObj.button_ON),
4901
4917
  );
4902
4918
  setUserSelect($id(`lblWorkDataView`), `text`);
4903
4919
  setUserSelect($id(`lblKeyDataView`), `text`);
@@ -4910,6 +4926,7 @@ const dataMgtInit = () => {
4910
4926
  keyListSprite.appendChild(createMgtButton(key, j - 2, 0, {
4911
4927
  w: Math.max(50, getStrWidth(getKeyName(key) + ` `, g_limitObj.setLblSiz, getBasicFont())),
4912
4928
  func: () => {
4929
+ selectedKey = key;
4913
4930
  lblKeyDataView.innerHTML = viewKeyStorage(`keyStorage`, key);
4914
4931
  lblTargetKey.innerHTML = `(${getKeyName(key)})`;
4915
4932
  },
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2025/02/20 (v39.7.2)
8
+ * Revised : 2025/02/21 (v39.8.0)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -193,7 +193,7 @@ const getScMsg = {
193
193
  const updateWindowSiz = () => {
194
194
  Object.assign(g_windowObj, {
195
195
  optionSprite: { x: (g_sWidth - 450) / 2, y: 65, w: 450, h: 325 },
196
- dataSprite: { x: (g_sWidth - Math.max(g_sWidth - 100, 450)) / 2, y: 65, w: Math.max(g_sWidth - 100, 450), h: 325 },
196
+ dataSprite: { x: g_btnX() + (g_sWidth - Math.max(g_sWidth - 100, 450)) / 2, y: 65, w: Math.max(g_sWidth - 100, 450), h: 325 },
197
197
  difList: { x: 165, y: 60, w: 280, h: 270 + g_sHeight - 500, overflow: C_DIS_AUTO, pointerEvents: C_DIS_AUTO },
198
198
  difCover: { x: 20, y: 60, w: 145, h: 270 + g_sHeight - 500, opacity: 0.95, pointerEvents: C_DIS_AUTO },
199
199
  difFilter: { x: 0, y: 66, w: 140, h: 204 + g_sHeight - 500, overflow: C_DIS_AUTO, pointerEvents: C_DIS_AUTO },
@@ -268,6 +268,12 @@ const updateWindowSiz = () => {
268
268
  overflow: C_DIS_AUTO, background: `#222222`, color: `#cccccc`,
269
269
  whiteSpace: `nowrap`,
270
270
  },
271
+ btnWorkStorage: {
272
+ x: g_btnX(1) - 140, y: 100, w: 70, h: 20, siz: 16,
273
+ },
274
+ btnKeyStorage: {
275
+ x: g_btnX(1) - 140, y: 100 + g_sHeight / 4 + 10, w: 70, h: 20, siz: 16,
276
+ },
271
277
 
272
278
  /** 設定画面 */
273
279
  btnBack: {
@@ -3390,6 +3396,7 @@ const g_lang_msgInfoObj = {
3390
3396
  I_0003: `各譜面の明細情報をクリップボードにコピーしました!`,
3391
3397
  I_0004: `musicUrlが設定されていないため、無音モードで再生します`,
3392
3398
  I_0005: `正規のミラー譜面で無いため、ハイスコアは保存されません`,
3399
+ I_0006: `ローカルストレージ情報をクリップボードにコピーしました!`,
3393
3400
  },
3394
3401
  En: {
3395
3402
  W_0001: `Your browser is not guaranteed to work.<br>
@@ -3443,6 +3450,7 @@ const g_lang_msgInfoObj = {
3443
3450
  I_0003: `Charts information is copied to the clipboard!`,
3444
3451
  I_0004: `Play in silence mode because "musicUrl" is not set`,
3445
3452
  I_0005: `Highscore is not saved because not a regular mirrored chart.`,
3453
+ I_0006: `Local storage information copied to clipboard!`,
3446
3454
  },
3447
3455
  };
3448
3456
 
@@ -3487,6 +3495,7 @@ const g_lblNameObj = {
3487
3495
  b_reset: `Reset Key`,
3488
3496
  b_safeMode: `Safe Mode -> `,
3489
3497
  b_undo: `Restore`,
3498
+ b_copyStorage: `Copy`,
3490
3499
  b_settings: `To Settings`,
3491
3500
  b_copy: `CopyResult`,
3492
3501
  b_tweet: `Post X`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "39.7.2",
3
+ "version": "39.8.0",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "index.js",
6
6
  "scripts": {