Skip to content

Commit 59f19bc

Browse files
committed
修复 在 Clone 中切换 HTTPS / SSH 时加速源消失的问题; 修复 在 Clone 中底部消失的点击复制提示
1 parent 8daa0bc commit 59f19bc

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

GithubEnhanced-High-Speed-Download.user.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @name:zh-CN Github 增强 - 高速下载
44
// @name:zh-TW Github 增強 - 高速下載
55
// @name:ru Улучшение GitHub – быстрое скачивание
6-
// @version 2.6.35
6+
// @version 2.6.36
77
// @author X.I.U
88
// @description High-speed download of Git Clone/SSH, Release, Raw, Code(ZIP) and other files (Based on public welfare), project list file quick download (☁)
99
// @description:zh-CN 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件 (公益加速)、项目列表单文件快捷下载 (☁)
@@ -267,7 +267,7 @@
267267
addDownloadZIP(target);
268268
addGitClone(target);
269269
addGitCloneSSH(target);
270-
} else if (target.tagName === 'DIV' && target.className.indexOf('Box-sc-') != -1) {
270+
} else if (target.tagName === 'DIV' && target.className.indexOf('LocalTab-module__') != -1) {
271271
if (target.querySelector('input[value^="https:"]')) {
272272
addGitCloneClear('.XIU2-GCS'); addGitClone(target);
273273
} else if (target.querySelector('input[value^="git@"]')) {
@@ -366,8 +366,8 @@
366366
html_parent = '<div style="margin-top: 4px;" class="XIU2-GC ' + html.parentElement.className + '">',
367367
url = '', _html = '', _gitClone = '';
368368
if (html.nextElementSibling) html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮(考虑到能直接点击复制,就不再重复实现复制按钮事件了)
369-
if (html.parentElement.nextElementSibling.tagName === 'SPAN'){
370-
html.parentElement.nextElementSibling.textContent += ' (↑点击上面文字可复制)'
369+
if (html.parentElement.nextElementSibling.tagName === 'P'){
370+
html.parentElement.nextElementSibling.textContent += ' (↑点击文字自动复制)'
371371
}
372372
if (GM_getValue('menu_gitClone')) {_gitClone='git clone '; html.value = _gitClone + html.value; html.setAttribute('value', html.value);}
373373
// 克隆原 Git Clone 元素
@@ -397,8 +397,8 @@
397397
html_parent = '<div style="margin-top: 4px;" class="XIU2-GCS ' + html.parentElement.className + '">',
398398
url = '', _html = '', _gitClone = '';
399399
html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮(考虑到能直接点击复制,就不再重复实现复制按钮事件了)
400-
if (html.parentElement.nextElementSibling.tagName === 'SPAN'){
401-
html.parentElement.nextElementSibling.textContent += ' (↑点击文字可复制)'
400+
if (html.parentElement.nextElementSibling.tagName === 'P'){
401+
html.parentElement.nextElementSibling.textContent += ' (↑点击自动复制)'
402402
}
403403
if (GM_getValue('menu_gitClone')) {_gitClone='git clone '; html.value = _gitClone + html.value; html.setAttribute('value', html.value);}
404404
// 克隆原 Git Clone SSH 元素

0 commit comments

Comments
 (0)