mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-06-04 11:13:59 +08:00
feat: 脚本链接叠加参数调整
This commit is contained in:
parent
e2011de69e
commit
4d27e5bdac
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.19.9",
|
"version": "2.19.10",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -114,12 +114,7 @@ async function processFn(
|
|||||||
if (item.type.indexOf('Script') !== -1) {
|
if (item.type.indexOf('Script') !== -1) {
|
||||||
const { mode, content } = item.args;
|
const { mode, content } = item.args;
|
||||||
if (mode === 'link') {
|
if (mode === 'link') {
|
||||||
let noCache;
|
|
||||||
let url = content || '';
|
let url = content || '';
|
||||||
if (url.endsWith('#noCache')) {
|
|
||||||
url = url.replace(/#noCache$/, '');
|
|
||||||
noCache = true;
|
|
||||||
}
|
|
||||||
// extract link arguments
|
// extract link arguments
|
||||||
const rawArgs = url.split('#');
|
const rawArgs = url.split('#');
|
||||||
if (rawArgs.length > 1) {
|
if (rawArgs.length > 1) {
|
||||||
@ -138,7 +133,14 @@ async function processFn(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
url = `${url.split('#')[0]}${noCache ? '#noCache' : ''}`;
|
url = `${url.split('#')[0]}${
|
||||||
|
rawArgs[2]
|
||||||
|
? `#${rawArgs[2]}`
|
||||||
|
: $arguments?.noCache != null ||
|
||||||
|
$arguments?.insecure != null
|
||||||
|
? `#${rawArgs[1]}`
|
||||||
|
: ''
|
||||||
|
}`;
|
||||||
const downloadUrlMatch = url.match(
|
const downloadUrlMatch = url.match(
|
||||||
/^\/api\/(file|module)\/(.+)/,
|
/^\/api\/(file|module)\/(.+)/,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user