diff --git a/docs/index.html b/docs/index.html
index ca56c0a..d628975 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -98,6 +98,9 @@
margin: 0;
padding: 0;
}
+ .copy-output {
+ cursor:pointer;
+ }
@@ -127,6 +130,7 @@ Himalaya
Include positions
+
@@ -177,6 +181,18 @@
Himalaya
$('#output').innerText = JSON.stringify(code, null, 2)
}
+
+ function copyOutput() {
+ var output = document.getElementById('output');
+ var copy = document.createElement('textarea');
+ copy.setAttribute('id', 'clipboard');
+ copy.innerHTML = output.innerText;
+ document.body.appendChild(copy);
+ copy = document.getElementById('clipboard');
+ copy.select();
+ document.execCommand('copy');
+ document.body.removeChild(copy);
+ }
$('#source').onkeyup = updateOutput
$('#whitespace').onchange = updateOutput