mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-16 02:24:06 -08:00
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);
|