增加更多加速

This commit is contained in:
NewName
2024-12-25 05:27:28 +08:00
parent 33927a7578
commit b368436a60
4 changed files with 29 additions and 13 deletions

View File

@@ -386,7 +386,7 @@
</div>
<div class="tips">
<div class="tips-content">
<p>支持release、archive文件支持git clone、wget、curl等等操作,转换后的链接可直接使用</p><br>
<p>支持release、archive文件支持git clone、wget、curl等等操作<br>支持Al模型库Hugging Face支持docker-ce官方压缩包下载</p><br>
</div>
</div>
@@ -468,13 +468,20 @@
var currentHost = window.location.host;
var formattedLink = "";
var link = githubLinkInput.value.trim();
if (link.startsWith("https://") || link.startsWith("http://")) {
formattedLink = "https://" + currentHost + "/" + link;
} else if (link.startsWith("github.com/") || link.startsWith("raw.githubusercontent.com/") || link.startsWith("gist.githubusercontent.com/")) {
} else if (
link.startsWith("github.com/") ||
link.startsWith("raw.githubusercontent.com/") ||
link.startsWith("gist.githubusercontent.com/") ||
link.startsWith("huggingface.co/") ||
link.startsWith("cdn-lfs.hf.co/") ||
link.startsWith("download.docker.com/")
) {
formattedLink = "https://" + currentHost + "/https://" + link;
} else {
showToast('请输入有效的GitHub链接');
showToast('请输入有效的链接');
return;
}
@@ -483,6 +490,7 @@
displayButton();
}
function displayButton() {
var copyButton = document.getElementById('copyButton');
var redirButton = document.getElementById('redirButton');
@@ -521,4 +529,4 @@
</script>
</body>
</html>
</html>