mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-14 01:24:04 -08:00
328d81999a
* added `Copy to clipboard` button Signed-off-by: Stafford Williams <[email protected]> * generate vsfdata Signed-off-by: Stafford Williams <[email protected]> * new lines Signed-off-by: Stafford Williams <[email protected]> * single newline Signed-off-by: Stafford Williams <[email protected]>
13 lines
363 B
JavaScript
13 lines
363 B
JavaScript
function init() {
|
|
$("#copyToClipboard").on("click", function () {
|
|
var range = document.createRange();
|
|
range.selectNode(document.getElementById("config_yaml"));
|
|
window.getSelection().empty();
|
|
window.getSelection().addRange(range);
|
|
document.execCommand("copy");
|
|
window.getSelection().empty();
|
|
});
|
|
}
|
|
|
|
$(init);
|