feat: udpate wget.ts

This commit is contained in:
2025-03-23 22:00:36 +08:00
parent 23f750d8cd
commit e170e2c245
2 changed files with 10 additions and 6 deletions

View File

@@ -88,11 +88,11 @@
}, },
"wget.ts": { "wget.ts": {
"script_name": "wget.ts", "script_name": "wget.ts",
"script_length": 3986, "script_length": 4069,
"script_sha256": "84239c527ed1edae70b36bebd0ad5f6a808e8e6b84c04b403ebf21248cb76d7c", "script_sha256": "4b66d00dcf450e349553419fea50d2ada1ac539a13374beda6df3f7b44bc7927",
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/wget.ts", "script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/wget.ts",
"single_script_file": true, "single_script_file": true,
"publish_time": 1737272626139, "publish_time": 1737272626139,
"update_time": 1737650670433 "update_time": 1742738412083
} }
} }

View File

@@ -37,8 +37,12 @@ function getFilenameFromUrl(url: string): string {
if (!filename) { if (!filename) {
filename = "index.html"; filename = "index.html";
} }
try {
return decodeURIComponent(filename);
} catch (e) {
return filename; return filename;
} }
}
function getOutputFilenameFromUrl(url: string): string { function getOutputFilenameFromUrl(url: string): string {
return getOutputFilename(getFilenameFromUrl(url)); return getOutputFilename(getFilenameFromUrl(url));
@@ -137,5 +141,5 @@ log.success(
}`, }`,
); );
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20250124T004247+08:00.MEYCIQCsT/Zzt0SJxCiKOC3a // @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20250323T215914+08:00.MEUCIQDMzVu+oh/6ES4XhxQX
// 9bQrIKB/ACboAmYBKI/J3NFxaQIhAP4QhCiNBuW8VmCt3vcLtR9j5dEAifR8dpJFeloUXCWb // sIMB7e2ApNkqkROUqf10xgZqVQIgdSARi8Wg4WDWHVL2YB8WsMYZEJKafSTSt5Za+hy7dcY=