danoniplus 40.4.2 → 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 +2 -2
- package/js/template/danoni_cdn.js +23 -0
- package/package.json +1 -1
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.
|
|
11
|
+
const g_version = `Ver 40.4.3`;
|
|
12
12
|
const g_revisedDate = `2025/03/12`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
@@ -2431,7 +2431,7 @@ const initialControl = async () => {
|
|
|
2431
2431
|
|
|
2432
2432
|
// 共通設定ファイルの指定
|
|
2433
2433
|
let tmpSettingType = g_rootObj.settingType ?? ``;
|
|
2434
|
-
if (g_remoteFlg &&
|
|
2434
|
+
if (g_remoteFlg && !tmpSettingType.includes(`(..)`)) {
|
|
2435
2435
|
tmpSettingType = `(..)../js/${tmpSettingType}`;
|
|
2436
2436
|
};
|
|
2437
2437
|
let [settingType, settingRoot] = getFilePath(tmpSettingType);
|
|
@@ -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
|
+
});
|