diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js
index 470dcfe..a937d36 100644
--- a/GithubEnhanced-High-Speed-Download.user.js
+++ b/GithubEnhanced-High-Speed-Download.user.js
@@ -3,7 +3,7 @@
// @name:zh-CN Github 增强 - 高速下载
// @name:zh-TW Github 增強 - 高速下載
// @name:en Github Enhancement - High Speed Download
-// @version 2.5.6
+// @version 2.5.7
// @author X.I.U
// @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件 (公益加速)、项目列表单文件快捷下载 (☁)、添加 git clone 命令
// @description:zh-CN 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件 (公益加速)、项目列表单文件快捷下载 (☁)
@@ -99,8 +99,6 @@
//['https://raw.fastgit.org', '德国', '[德国] - 该公益加速源由 [FastGit] 提供
- 缓存:无(或时间很短)'], // 挂了
//['https://git.yumenaka.net/https://raw.githubusercontent.com', '美国', '[美国 圣何塞]
- 缓存:无(或时间很短)'], // 连接超时
], svg = [
- '',
- '',
''
], style = ['padding:0 6px; margin-right: -1px; border-radius: 2px; background-color: var(--XIU2-back-Color); border-color: rgba(27, 31, 35, 0.1); font-size: 11px; color: var(--XIU2-font-Color);'];
@@ -221,6 +219,12 @@
href_slice = href_script.textContent.slice(href_script.textContent.indexOf('"zipballUrl":"')+14),
href = href_slice.slice(0, href_slice.indexOf('"')),
url = '', _html = '', new_download_url = get_New_download_url();
+
+ // 克隆原 Download ZIP 元素,并定位 标签
+ let html_clone = html.cloneNode(true),
+ html_clone_a = html_clone.querySelector('a[href$=".zip"]'),
+ html_clone_span = html_clone.querySelector('span[id]');
+
for (let i=0;iDownload ZIP ${new_download_url[i][1]}`
+
+ html_clone_a.href = url
+ html_clone_a.setAttribute('title', new_download_url[i][2].replaceAll('
','\n'))
+ html_clone_span.textContent = 'Download ZIP ' + new_download_url[i][1]
+ _html += html_clone.outerHTML
}
html.insertAdjacentHTML('afterend', _html);
}
@@ -249,14 +256,15 @@
url = '', _html = '', _gitClone = '';
html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮
if (GM_getValue('menu_gitClone')) {_gitClone='git clone '; html.value = _gitClone + html.value; html.setAttribute('value', html.value);}
+ // 克隆原 Git Clone 元素
+ let html_clone = html.cloneNode(true);
for (let i=0;i'
}
@@ -272,10 +280,11 @@
url = '', _html = '', _gitClone = '';
html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮
if (GM_getValue('menu_gitClone')) {_gitClone='git clone '; html.value = _gitClone + html.value; html.setAttribute('value', html.value);}
+ // 克隆原 Git Clone SSH 元素
+ let html_clone = html.cloneNode(true);
for (let i=0;i'
}
@@ -342,7 +351,7 @@
}
url_name = raw_url[menu_rawFast][1]; url_tip = raw_url[menu_rawFast][2];
- fileElm.insertAdjacentHTML('afterend', `${svg[2]}`);
+ fileElm.insertAdjacentHTML('afterend', `${svg[0]}`);
// 绑定鼠标事件
trElm.onmouseover = mouseOverHandler;
trElm.onmouseout = mouseOutHandler;