danoniplus 40.7.0 → 40.7.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 +18 -5
  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 : 2025/03/22
7
+ * Revised : 2025/04/12
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 40.7.0`;
12
- const g_revisedDate = `2025/03/22`;
11
+ const g_version = `Ver 40.7.2`;
12
+ const g_revisedDate = `2025/04/12`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -60,6 +60,7 @@ const g_referenceDomains = [
60
60
  `cwtickle.github.io/danoniplus`,
61
61
  `cdn.jsdelivr.net`,
62
62
  `unpkg.com`,
63
+ `www.unpkg.com`,
63
64
  `support-v\\d+--danoniplus.netlify.app`,
64
65
  ];
65
66
  Object.freeze(g_referenceDomains);
@@ -77,7 +78,19 @@ const g_isDebug = g_isLocal ||
77
78
  getQueryParamVal(`debug`) === `true`;
78
79
  const isLocalMusicFile = _scoreId => g_isFile && !listMatching(getMusicUrl(_scoreId), [`.js`, `.txt`], { suffix: `$` });
79
80
 
80
- window.onload = async () => {
81
+ // 50msごとにdocument.readyStateをチェックしてcompleteになったらresolve
82
+ const waitUntilLoaded = () => {
83
+ return new Promise(resolve => {
84
+ const checkReadyState = setInterval(() => {
85
+ if (document.readyState === 'complete') {
86
+ clearInterval(checkReadyState);
87
+ resolve();
88
+ }
89
+ }, 50);
90
+ });
91
+ };
92
+ (async () => {
93
+ await waitUntilLoaded();
81
94
  g_loadObj.main = true;
82
95
  g_currentPage = `initial`;
83
96
  const links = document.querySelectorAll(`link`);
@@ -90,7 +103,7 @@ window.onload = async () => {
90
103
  await loadScript2(`${g_rootPath}../js/lib/danoni_constants.js?${g_randTime}`);
91
104
  await loadScript2(`${g_rootPath}../js/lib/legacy_functions.js?${g_randTime}`, false);
92
105
  initialControl();
93
- };
106
+ })();
94
107
 
95
108
  /*-----------------------------------------------------------*/
96
109
  /* Scene : COMMON [water] */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "40.7.0",
3
+ "version": "40.7.2",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "scripts": {