clickgo 3.0.3-dev4 → 3.0.4-dev5

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/README.md CHANGED
@@ -19,7 +19,7 @@ Load the module loader first, and then load it using the module loader.
19
19
  **index.html**
20
20
 
21
21
  ```html
22
- <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.2.0/dist/loader.min.js?path=index"></script>
22
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.3.0/dist/loader.min.js?path=index&npm={'clickgo':'3.0.4-dev5'}"></script>
23
23
  ```
24
24
 
25
25
  **index.js**
package/dist/lib/core.js CHANGED
@@ -497,7 +497,6 @@ function fetchApp(url, opt = {}) {
497
497
  if (!opt.current.endsWith('/')) {
498
498
  return null;
499
499
  }
500
- current = opt.current.slice(0, -1);
501
500
  if (!url.startsWith('/')) {
502
501
  url = '/current/' + url;
503
502
  }
@@ -506,11 +505,10 @@ function fetchApp(url, opt = {}) {
506
505
  if (!url.startsWith('/clickgo/') && !url.startsWith('/storage/') && !url.startsWith('/mounted/')) {
507
506
  current = tool.urlResolve(window.location.href, url);
508
507
  if (cga) {
509
- current = current.slice(0, -cga.length - 1);
508
+ current = current.slice(0, -cga.length);
510
509
  url = '/current/' + cga;
511
510
  }
512
511
  else {
513
- current = current.slice(0, -1);
514
512
  url = '/current/';
515
513
  }
516
514
  }
package/dist/lib/core.ts CHANGED
@@ -540,7 +540,7 @@ export async function readApp(blob: Blob): Promise<false | types.IApp> {
540
540
  /**
541
541
  * --- 从网址下载应用,App 模式下本方法不可用 ---
542
542
  * @param url 对于当前网页的相对、绝对路径,以 / 结尾的目录或 .cga 结尾的文件 ---
543
- * @param opt,notifyId:显示进度条的 notify id,current:设置则以设置的为准,否则以 location 为准 ---
543
+ * @param opt,notifyId:显示进度条的 notify id,current:设置则以设置的为准,以 / 结尾,否则以 location 为准 ---
544
544
  */
545
545
  export async function fetchApp(url: string, opt: types.ICoreFetchAppOptions = {}): Promise<null | types.IApp> {
546
546
  /** --- 若是 cga 文件,则是 cga 的文件名,含 .cga --- */
@@ -558,7 +558,6 @@ export async function fetchApp(url: string, opt: types.ICoreFetchAppOptions = {}
558
558
  if (!opt.current.endsWith('/')) {
559
559
  return null;
560
560
  }
561
- current = opt.current.slice(0, -1);
562
561
  if (!url.startsWith('/')) {
563
562
  url = '/current/' + url;
564
563
  }
@@ -567,11 +566,10 @@ export async function fetchApp(url: string, opt: types.ICoreFetchAppOptions = {}
567
566
  if (!url.startsWith('/clickgo/') && !url.startsWith('/storage/') && !url.startsWith('/mounted/')) {
568
567
  current = tool.urlResolve(window.location.href, url);
569
568
  if (cga) {
570
- current = current.slice(0, -cga.length - 1);
569
+ current = current.slice(0, -cga.length);
571
570
  url = '/current/' + cga;
572
571
  }
573
572
  else {
574
- current = current.slice(0, -1);
575
573
  url = '/current/';
576
574
  }
577
575
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo",
3
- "version": "3.0.3-dev4",
3
+ "version": "3.0.4-dev5",
4
4
  "description": "Background interface, software interface, mobile phone APP interface operation library.",
5
5
  "keywords": [
6
6
  "deskrt",