From 39af283b079883be9ba0da453424f3fba23c69b6 Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Fri, 22 Sep 2023 13:17:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8A=A0=E8=BD=BDjs=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 3cd260c..e14281d 100644 --- a/index.html +++ b/index.html @@ -50,10 +50,9 @@ button{ return new Promise((resolve, reject) => { let src = sub[0]; console.log(`>> begin load script: ${src}`); - var s = document.createElement('script'); + let s = document.createElement('script'); s.async = true; if (sub[1] == 1)s.type = 'module'; - // s.src = src + (src.indexOf("?") == -1 ? "?" : "&") + "t=" + Date.now(); s.src =src; s.addEventListener('load', function () { console.log(`<< finish load script: ${src}`); @@ -81,8 +80,7 @@ button{ list[loaded][0] = list[loaded][0] + (list[loaded][0].indexOf("?") == -1 ? "?" : "&") + "t=" + Date.now(); } loadSingleScript(list[loaded]).then(() => { - loaded++; - if (loaded >= list.length) { + if (++loaded >= list.length) { resolve && resolve(); } else { return loadNext();