mirror of
https://github.com/XIU2/UserScript.git
synced 2026-07-24 11:03:23 +00:00
修复 GithubEnhanced 每次打开 Clone 面板都报错 Cannot set properties of null (setting 'hidden')
关闭【添加 git clone 命令】选项时,每次切换 Clone 面板显示/隐藏时都会报错 Cannot set properties of null (setting 'hidden')
This commit is contained in:
@@ -292,7 +292,7 @@
|
||||
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 = '';
|
||||
html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮(考虑到能直接点击复制,就不再重复实现复制按钮事件了)
|
||||
if (html.nextElementSibling) html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮(考虑到能直接点击复制,就不再重复实现复制按钮事件了)
|
||||
if (html.parentElement.nextElementSibling.tagName === 'SPAN'){
|
||||
html.parentElement.nextElementSibling.textContent += ' (↑点击上面文字可复制)'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user