danoniplus 40.4.1 → 40.4.3

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
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 40.4.1`;
11
+ const g_version = `Ver 40.4.3`;
12
12
  const g_revisedDate = `2025/03/12`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
@@ -2430,7 +2430,11 @@ const initialControl = async () => {
2430
2430
  await loadChartFile(0);
2431
2431
 
2432
2432
  // 共通設定ファイルの指定
2433
- let [settingType, settingRoot] = getFilePath(g_rootObj.settingType ?? ``);
2433
+ let tmpSettingType = g_rootObj.settingType ?? ``;
2434
+ if (g_remoteFlg && !tmpSettingType.includes(`(..)`)) {
2435
+ tmpSettingType = `(..)../js/${tmpSettingType}`;
2436
+ };
2437
+ let [settingType, settingRoot] = getFilePath(tmpSettingType);
2434
2438
  if (settingType !== ``) {
2435
2439
  settingType = `_${settingType}`;
2436
2440
  }
@@ -0,0 +1,23 @@
1
+ 
2
+ /**
3
+ * jsdelivrのdanoni_main.jsを取得するスクリプトサンプル
4
+ *
5
+ * - このファイルを danoni_main.js と差し替えて、
6
+ * jsフォルダに「version.txt」を格納することで jsdelivr のファイルを取りに行くようになります。
7
+ * - version.txt にはバージョン名 (x.y.z形式) を入れて下さい。
8
+ * - カレントパス指定には対応していないので、version.txtのパスは必要に応じて変えてください。
9
+ */
10
+
11
+ // バージョン情報を取得してスクリプトタグを生成
12
+ const randTime = Date.now();
13
+ fetch(`../js/version.txt?${randTime}`)
14
+ .then(response => response.text())
15
+ .then(version => {
16
+ const script = document.createElement('script');
17
+ script.src = `https://cdn.jsdelivr.net/npm/danoniplus@${version}/js/danoni_main.min.js`;
18
+ document.head.appendChild(script); // スクリプトをヘッダーに追加
19
+ console.log(`Loaded version: ${version}`);
20
+ })
21
+ .catch(error => {
22
+ console.error('Failed to load version:', error);
23
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "40.4.1",
3
+ "version": "40.4.3",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "index.js",
6
6
  "scripts": {