File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,17 @@ git push -u origin {{.Repository.DefaultBranch}}</code></pre>
50
50
git push -u origin {{.Repository.DefaultBranch}}</code></pre>
51
51
</div>
52
52
</div>
53
- <script defer>
54
- /* eslint-disable no-undef */
55
- const cloneUrls = document.getElementsByClassName('clone-url');
56
- if (cloneUrls) {
57
- for (let i = 0; i < cloneUrls.length; i++) {
58
- cloneUrls[i].textContent = (isSSH ? sshButton : httpsButton).getAttribute('data-link');
53
+ <script>
54
+ (() => {
55
+ const proto = localStorage.getItem('repo-clone-protocol') || 'https';
56
+ const btn = document.getElementById(`repo-clone-${proto}`) || document.getElementById(`repo-clone-https`) || document.getElementById(`repo-clone-ssh`);
57
+ if (btn) {
58
+ const cloneUrls = document.getElementsByClassName('clone-url');
59
+ for (let i = 0; i < cloneUrls.length; i++) {
60
+ cloneUrls[i].textContent = btn.getAttribute('data-link');
61
+ }
59
62
}
60
- }
63
+ })();
61
64
</script>
62
65
{{end}}
63
66
{{else}}
You can’t perform that action at this time.
0 commit comments