-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprincipal.js
More file actions
42 lines (31 loc) · 1.03 KB
/
principal.js
File metadata and controls
42 lines (31 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function copiar(){
var copia = document.getElementById("text");
copia.select();
document.execCommand("copy");
copia.select();
document.execCommand("cut");
}
function criptografar(){
var textarea = document.getElementById("criptografar");
var n = textarea.value;
n = n.replace(/(e)/g,'enter');
n = n.replace(/(i)/g,'imes');
n = n.replace(/(a)/g,"ai");
n = n.replace(/(o)/g,'ober');
n = n.replace(/(u)/g,'ufat');
document.getElementById("text").value = n;
document.getElementById("inserir").style.display = "inline";
document.getElementById("imagem").style.display = "none";
textarea.select();
document.execCommand("cut");
}
function descriptografar(){
var textarea = document.getElementById("criptografar");
var n = textarea.value;
n = n.replace(/enter/g,'e');
n = n.replace(/imes/g,'i');
n = n.replace(/(ai)/g,"a");
n = n.replace(/(ober)/g,'o');
n = n.replace(/(ufat)/g,'u');
document.getElementById("text").value = n;
}