本脚本将替换剪贴板中符合GitHub规则的链接,以实现快速调用其它下载器进行下载
const mirrors = [
"https://ghproxy.net",
"http://gh.927223.xyz",
"https://github.tbedu.top",
"https://ghfile.geekertao.top",
"https://ghf.无名氏.top",
"https://ghm.078465.xyz",
"https://gh-proxy.net",
"https://jiashu.1win.eu.org",
"https://j.1win.ggff.net",
"https://j.1lin.dpdns.org",
"https://git.yylx.win",
"https://tvv.tw",
"https://gitproxy.127731.xyz",
"https://gh.catmak.name",
"https://github.dpik.top",
"https://gh.dpik.top",
"https://gh-proxy.com",
"https://gh.felicity.ac.cn",
"https://github-proxy.memory-echoes.cn",
"https://gh.inkchills.cn",
"https://cdn.akaere.online",
"https://cdn.gh-proxy.com",
"https://github.starrlzy.cn",
"https://down.mxw.xx.kg",
"https://gh.acmsz.top",
];
var text = mn.GetClipboardText();
if (text) {
var targetPrefixes = [
"https://github.com",
"http://github.com",
"https://raw.githubusercontent.com",
"http://raw.githubusercontent.com",
];
var isMatch = targetPrefixes.some(function (prefix) {
return text.startsWith(prefix);
});
if (isMatch) {
var randomIndex = mn.GetTickCount64() % mirrors.length;
var newUrl = mirrors[randomIndex] + "/" + text;
mn.SetClipboardText(newUrl);
} else {
mn.MsgBox("内容非GitHub可下载链接");
}
}
mn.exit();