feat: 订阅和文件的远程链接支持使用换行混写三种格式 1. 完整远程链接 2. 类似 /api/file/name 的内部文件调用路径 3. 本地文件的绝对路径

This commit is contained in:
xream
2025-06-03 00:10:45 +08:00
parent 2093baaedb
commit bd2b3f3fdf
6 changed files with 55 additions and 22 deletions

View File

@@ -177,7 +177,7 @@ async function processFn(
} else if (url?.startsWith('/')) {
try {
const fs = eval(`require("fs")`);
script = fs.readFileSync(url, 'utf8');
script = fs.readFileSync(url.split('#')[0], 'utf8');
// $.info(`Script loaded: >>>\n ${script}`);
} catch (err) {
$.error(