mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-21 08:57:19 +08:00
fix(clipboard): copy of multiple rules was broken
This commit is contained in:
parent
135d4b7c1a
commit
bbba46c41b
1 changed files with 3 additions and 3 deletions
|
|
@ -3,14 +3,14 @@ $(function () {
|
|||
text: function (trigger) {
|
||||
const id = trigger.getAttribute('data-clipboard-target-id');
|
||||
const html = $("#" + id + " .highlight");
|
||||
return html.text();
|
||||
return html.text() + '\n';
|
||||
},
|
||||
});
|
||||
var clipboardCategories = new ClipboardJS('.clipboard-multiple', {
|
||||
text: function (trigger) {
|
||||
const id = trigger.getAttribute('data-clipboard-target-id');
|
||||
const html = $("[id^=" + id + "] .highlight");
|
||||
return html.append("\n\n").text();
|
||||
return Array.from(html.map((i, target) => $(target).text())).join('\n\n');
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue