File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 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>
5050git push -u origin {{.Repository.DefaultBranch}}</code></pre>
5151 </div>
5252 </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+ }
5962 }
60- }
63+ })();
6164 </script>
6265 {{end}}
6366 {{else}}
You can’t perform that action at this time.
0 commit comments