From 05e7cca973683d9516686f38f8cefdeb2f343efe Mon Sep 17 00:00:00 2001 From: richex-cn Date: Mon, 25 Nov 2024 14:04:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20GithubEnhanced=20=E6=AF=8F?= =?UTF-8?q?=E6=AC=A1=E6=89=93=E5=BC=80=20Clone=20=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E9=83=BD=E6=8A=A5=E9=94=99=20Cannot=20set=20properties=20of=20?= =?UTF-8?q?null=20(setting=20'hidden')?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关闭【添加 git clone 命令】选项时,每次切换 Clone 面板显示/隐藏时都会报错 Cannot set properties of null (setting 'hidden') --- GithubEnhanced-High-Speed-Download.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index d6498ac..446fb62 100644 --- a/GithubEnhanced-High-Speed-Download.user.js +++ b/GithubEnhanced-High-Speed-Download.user.js @@ -292,7 +292,7 @@ let href_split = html.value.split(location.host)[1], html_parent = '
', url = '', _html = '', _gitClone = ''; - html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮(考虑到能直接点击复制,就不再重复实现复制按钮事件了) + if (html.nextElementSibling) html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮(考虑到能直接点击复制,就不再重复实现复制按钮事件了) if (html.parentElement.nextElementSibling.tagName === 'SPAN'){ html.parentElement.nextElementSibling.textContent += ' (↑点击上面文字可复制)' }