mirror of
https://github.com/prometheus/prometheus
synced 2025-01-15 03:12:53 +00:00
328d81999a
* added `Copy to clipboard` button Signed-off-by: Stafford Williams <stafford.williams@gmail.com> * generate vsfdata Signed-off-by: Stafford Williams <stafford.williams@gmail.com> * new lines Signed-off-by: Stafford Williams <stafford.williams@gmail.com> * single newline Signed-off-by: Stafford Williams <stafford.williams@gmail.com>
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);
|