update
This commit is contained in:
16
landing.js
Normal file
16
landing.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const installCommand = 'curl -fsSL https://meghdadfadaee.github.io/nais/setup.sh | sh';
|
||||
|
||||
document.querySelectorAll('[data-copy-command]').forEach((button) => {
|
||||
button.addEventListener('click', async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(installCommand);
|
||||
const label = button.querySelector('.copy-label');
|
||||
label.textContent = 'Copied';
|
||||
window.setTimeout(() => {
|
||||
label.textContent = 'Copy';
|
||||
}, 1800);
|
||||
} catch {
|
||||
window.prompt('Copy the install command:', installCommand);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user