Przeglądaj źródła

兼容IOS 不支持断言匹配

Signed-off-by: skywolf627 <skywolf627@qq.com>
skywolf627 3 lat temu
rodzic
commit
007c863854
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      Web/src/utils/auto-update.ts

+ 2 - 1
Web/src/utils/auto-update.ts

@@ -4,7 +4,8 @@
  */
 
 let lastSrcs: any[] | null; //上次js地址集合
-const scriptReg = /(?<=<script.*src=["']).*?(?=["'])/gm;
+// const scriptReg = /(?<=<script.*src=["']).*?(?=["'])/gm; //IOS 不支持断言匹配
+const scriptReg = /<script.*?src=['"](.*?)['"]/gm;
 
 /**
  * 获取最新的js集合