Adds copy content button (#12584)

* adds copy content button #12499

* adds newline

* Omit hash mark from target string

* Clean up HTML element IDs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
Abhimanyu Saharan
2023-07-06 23:49:55 +05:30
committed by GitHub
parent 8143c6e03b
commit 62bdb90f61
12 changed files with 71 additions and 25 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,7 @@ import Clipboard from 'clipboard';
import { getElements } from './util';
export function initClipboard(): void {
for (const element of getElements('a.copy-token', 'button.copy-secret')) {
for (const element of getElements('a.copy-content')) {
new Clipboard(element);
}
}