danoniplus 40.7.0 → 40.7.1

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 +17 -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/03/24
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.1`;
12
+ const g_revisedDate = `2025/03/24`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -77,7 +77,19 @@ const g_isDebug = g_isLocal ||
77
77
  getQueryParamVal(`debug`) === `true`;
78
78
  const isLocalMusicFile = _scoreId => g_isFile && !listMatching(getMusicUrl(_scoreId), [`.js`, `.txt`], { suffix: `$` });
79
79
 
80
- window.onload = async () => {
80
+ // 50msごとにdocument.readyStateをチェックしてcompleteになったらresolve
81
+ const waitUntilLoaded = () => {
82
+ return new Promise(resolve => {
83
+ const checkReadyState = setInterval(() => {
84
+ if (document.readyState === 'complete') {
85
+ clearInterval(checkReadyState);
86
+ resolve();
87
+ }
88
+ }, 50);
89
+ });
90
+ };
91
+ (async () => {
92
+ await waitUntilLoaded();
81
93
  g_loadObj.main = true;
82
94
  g_currentPage = `initial`;
83
95
  const links = document.querySelectorAll(`link`);
@@ -90,7 +102,7 @@ window.onload = async () => {
90
102
  await loadScript2(`${g_rootPath}../js/lib/danoni_constants.js?${g_randTime}`);
91
103
  await loadScript2(`${g_rootPath}../js/lib/legacy_functions.js?${g_randTime}`, false);
92
104
  initialControl();
93
- };
105
+ })();
94
106
 
95
107
  /*-----------------------------------------------------------*/
96
108
  /* 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.1",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "scripts": {