@ -1,3 +1,6 @@
{{ / * Golang ' s template has a bug with string in terpolation containing slashes ,
the double slash will be treated as a comment there.
But there are also JS lint rules for template that require to use string interpolation in 1.17*/}}
<script>
<script>
// synchronously set clone button states and urls here to avoid flickering
// synchronously set clone button states and urls here to avoid flickering
// on page load. initRepoCloneLink calls this when proto changes.
// on page load. initRepoCloneLink calls this when proto changes.
@ -21,8 +24,9 @@
for (const el of document.getElementsByClassName('js-clone-url')) {
for (const el of document.getElementsByClassName('js-clone-url')) {
el[el.nodeName === 'INPUT' ? 'value' : 'textContent'] = link;
el[el.nodeName === 'INPUT' ? 'value' : 'textContent'] = link;
}
}
const sep = '//';
for (const el of document.getElementsByClassName('js-clone-url-vsc')) {
for (const el of document.getElementsByClassName('js-clone-url-vsc')) {
el['href'] = `vscode:// vscode.git/clone?url=$ { encodeURIComponent(link)}`;
el.href = `vscode:$ { sep} vscode.git/clone?url=$ { encodeURIComponent(link)}`;
}
}
})();
})();
</script>
</script>