mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-27 01:56:15 -04:00
feat: TokenGenerator + Hash
This commit is contained in:
parent
1fba5c42e1
commit
d1db2c8601
19 changed files with 610 additions and 135 deletions
13
src/utils/helpers.js
Normal file
13
src/utils/helpers.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
const copyToClipboard = (text) => {
|
||||
const input = document.createElement('textarea');
|
||||
input.innerHTML = text;
|
||||
document.body.appendChild(input);
|
||||
input.select();
|
||||
const result = document.execCommand('copy');
|
||||
document.body.removeChild(input);
|
||||
return result;
|
||||
}
|
||||
|
||||
export {
|
||||
copyToClipboard
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue