mirror of
https://github.com/aljazceru/CTFd.git
synced 2026-02-03 05:14:24 +01:00
5ce3003b Merge pull request #47 from aCursedComrade/patch-1 c9887cb1 Fix team template git-subtree-dir: CTFd/themes/core-beta git-subtree-split: 5ce3003b4d68352e629ee2d390bc999e7d6b071e
16 lines
318 B
JavaScript
16 lines
318 B
JavaScript
import { Tooltip } from "bootstrap";
|
|
|
|
export function copyToClipboard($input) {
|
|
const tooltip = new Tooltip($input, {
|
|
title: "Copied!",
|
|
trigger: "manual",
|
|
});
|
|
|
|
navigator.clipboard.writeText($input.value).then(() => {
|
|
tooltip.show();
|
|
setTimeout(() => {
|
|
tooltip.hide();
|
|
}, 1500);
|
|
});
|
|
}
|