-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit de5013d
Showing
4 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!DOCTYPE html> | ||
|
||
<html lang="es"> | ||
|
||
<head> | ||
<link rel="stylesheet" href="reset.css"> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Encriptador/Desencriptador</title> | ||
<link rel="stylesheet" href="style.css"> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300&display=swap" rel="stylesheet"> | ||
<script src="script.js" defer></script> | ||
<script> | ||
function copyText() { | ||
var copyText = document.getElementById('result'); | ||
copyText.select(); | ||
document.execCommand('copy'); | ||
alert('Texto copiado: ' + copyText.value); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<h1>Encriptador/Desencriptador</h1> | ||
<label for="inputTextArea"></label> | ||
<div> | ||
<textarea id="inputTextArea" rows="4" cols="50" placeholder="Ingrese texto aquí"></textarea> | ||
<p>Solo letras minusculas y sin acentos</p> | ||
<button onclick="encryptText()">Encriptar!</button> | ||
<button onclick="decryptText()">Desencriptar!</button> | ||
</div> | ||
<div><textarea id="result" rows="4" cols="50"></textarea><br> | ||
<button onclick="copyText()">Copiar</button> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* http://meyerweb.com/eric/tools/css/reset/ | ||
v2.0 | 20110126 | ||
License: none (public domain) | ||
*/ | ||
|
||
html, body, div, span, applet, object, iframe, | ||
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | ||
a, abbr, acronym, address, big, cite, code, | ||
del, dfn, em, img, ins, kbd, q, s, samp, | ||
small, strike, strong, sub, sup, tt, var, | ||
b, u, i, center, | ||
dl, dt, dd, ol, ul, li, | ||
fieldset, form, label, legend, | ||
table, caption, tbody, tfoot, thead, tr, th, td, | ||
article, aside, canvas, details, embed, | ||
figure, figcaption, footer, header, hgroup, | ||
menu, nav, output, ruby, section, summary, | ||
time, mark, audio, video { | ||
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
font-size: 100%; | ||
font: inherit; | ||
vertical-align: baseline; | ||
} | ||
/* HTML5 display-role reset for older browsers */ | ||
article, aside, details, figcaption, figure, | ||
footer, header, hgroup, menu, nav, section { | ||
display: block; | ||
} | ||
body { | ||
line-height: 1; | ||
} | ||
ol, ul { | ||
list-style: none; | ||
} | ||
blockquote, q { | ||
quotes: none; | ||
} | ||
blockquote:before, blockquote:after, | ||
q:before, q:after { | ||
content: ''; | ||
content: none; | ||
} | ||
table { | ||
border-collapse: collapse; | ||
border-spacing: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
function encryptText() { | ||
var inputText = document.getElementById('inputTextArea').value; | ||
var resultTextArea = document.getElementById('result'); | ||
var encryptedText = inputText | ||
.replace(/e/g, 'enter') | ||
.replace(/i/g, 'imes') | ||
.replace(/a/g, 'ai') | ||
.replace(/o/g, 'ober') | ||
.replace(/u/g, 'ufat'); | ||
resultTextArea.value = encryptedText; | ||
} | ||
|
||
function decryptText() { | ||
var inputText = document.getElementById('inputTextArea').value; | ||
var resultTextArea = document.getElementById('result'); | ||
var decryptedText = inputText | ||
.replace(/ufat/g, 'u') | ||
.replace(/ober/g, 'o') | ||
.replace(/ai/g, 'a') | ||
.replace(/imes/g, 'i') | ||
.replace(/enter/g, 'e'); | ||
resultTextArea.value = decryptedText; | ||
} |
Empty file.