Skip to content

Commit

Permalink
Adicionado sistema para copiar texto
Browse files Browse the repository at this point in the history
  • Loading branch information
SrBedrock committed Jul 17, 2024
1 parent e126f13 commit 0b1391c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ function getRandomHexColor() {
return Math.floor(Math.random()*16777215).toString(16).toUpperCase();
}

/*
Copies contents to clipboard

function copyTextToClipboard(text) {
let textArea = document.createElement('textarea');
textArea.value = text;
Expand All @@ -102,10 +101,9 @@ function copyTextToClipboard(text) {
textArea.select();

document.execCommand('copy');
alert('Copied output!');
alert('Texto copiado!');
document.body.removeChild(textArea);
}
*/

function showError(show) {
if (show) {
Expand Down

0 comments on commit 0b1391c

Please sign in to comment.