diff --git a/www/ghcup.js b/www/ghcup.js index 77dd6d4..39ceb37 100644 --- a/www/ghcup.js +++ b/www/ghcup.js @@ -149,7 +149,17 @@ function fill_in_bug_report_values() { } function copyToClipboard() { - const text = document.getElementsByClassName("ghcup-command").item(0).innerText; + const text = document.getElementById("ghcup-command-normal").innerText; + const el = document.createElement('textarea'); + el.value = text; + document.body.appendChild(el); + el.select(); + document.execCommand('copy'); + document.body.removeChild(el); +} + +function copyToClipboardSilicon() { + const text = document.getElementById("ghcup-command-silicon").innerText; const el = document.createElement('textarea'); el.value = text; document.body.appendChild(el); diff --git a/www/index.html b/www/index.html index d21d2ad..87b9445 100644 --- a/www/index.html +++ b/www/index.html @@ -33,9 +33,9 @@ @@ -108,7 +108,7 @@ in your terminal (as a user other than root), then follow the onscreen instructions.

curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

For macOS on Apple Silicon, run this instead:

-
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | arch -x86_64 /bin/bash
+
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | arch -x86_64 /bin/bash

If you don't like curl | sh, see other installation methods.

@@ -155,7 +155,7 @@ in your terminal (as a user other than root), then follow the onscreen instructions.

curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

For macOS on Apple Silicon, run this instead:

-
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | arch -x86_64 /bin/bash
+
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | arch -x86_64 /bin/bash

If you don't like curl | sh, see other installation methods.