缩进调整
parent
3ab1b5a113
commit
2e0c8e9834
|
@ -297,11 +297,11 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
|
||||
// Git Clone
|
||||
function addGitClone(target) {
|
||||
let html = target.querySelector('input[value^="https:"]:not([title])');if (!html) return
|
||||
let html = target.querySelector('input[value^="https:"]:not([title])');if (!html) return
|
||||
let href_split = html.value.split(location.host)[1],
|
||||
html_parent = '<div style="margin-top: 4px;" class="XIU2-GC ' + html.parentElement.className + '">',
|
||||
url = '', _html = '', _gitClone = '';
|
||||
if (html.nextElementSibling) html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮(考虑到能直接点击复制,就不再重复实现复制按钮事件了)
|
||||
if (html.nextElementSibling) html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮(考虑到能直接点击复制,就不再重复实现复制按钮事件了)
|
||||
if (html.parentElement.nextElementSibling.tagName === 'SPAN'){
|
||||
html.parentElement.nextElementSibling.textContent += ' (↑点击上面文字可复制)'
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
|
||||
// Git Clone SSH
|
||||
function addGitCloneSSH(target) {
|
||||
let html = target.querySelector('input[value^="git@"]:not([title])');if (!html) return
|
||||
let html = target.querySelector('input[value^="git@"]:not([title])');if (!html) return
|
||||
let href_split = html.value.split(':')[1],
|
||||
html_parent = '<div style="margin-top: 4px;" class="XIU2-GCS ' + html.parentElement.className + '">',
|
||||
url = '', _html = '', _gitClone = '';
|
||||
|
|
Loading…
Reference in New Issue