From 46a32d4201bfe3a8837fe158f780e2c5ec9879d6 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Thu, 18 Jul 2024 11:17:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJyPublic.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJyPublic.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SrcJyPublic.js b/SrcJyPublic.js index e6340090..4f69cf6f 100644 --- a/SrcJyPublic.js +++ b/SrcJyPublic.js @@ -81,13 +81,14 @@ function getDatas(lx, isyx) { }else if(/drpy2/.test(obj.api) && obj.type==3 && !obj.ext.includes('drpy.js') && hipy_t3_enable){ let extfile = obj.ext; if(extfile.startsWith('./')){ - extfile = dySource.substr(0, dySource.lastIndexOf('/')+1) + extfile.replace("../","").replace("./","").replace("./",""); + let urlpath = dySource.substr(0, dySource.lastIndexOf('/')+1); + extfile = extfile.replace("../", urlpath).replace(/\.\//g, urlpath); } let urlfile; if(dySource.startsWith('file://')){ urlfile = 'hiker://files/' + extfile.split('/files/Documents/')[1]; }else if(dySource.startsWith('http')){ - urlfile = cachepath + 'hipy_t3_' + extfile.substr(extfile.lastIndexOf('/') + 1); + urlfile = cachepath + 'hipy_t3_' + extfile.substr(extfile.lastIndexOf('/') + 1).split('?')[0]; try{ if(!fileExist(urlfile)){ let content = fetch(extfile, {timeout:2000});