Created
September 17, 2015 12:40
-
-
Save joffilyfe/c4c184ee311aaea81efb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Prodeaf Translator</title> | |
<style> | |
.page-container { | |
width: 70%; margin: 50px auto; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="page-container no-wlauto"> | |
<div class="text-box"> | |
<textarea id="to-translate" cols="40" rows="10"></textarea> | |
</div> | |
<div class="text-box"> | |
<textarea id="translated" cols="40" rows="10"></textarea> | |
</div> | |
<div class="actions"> | |
<button class="start">Iniciar</button> | |
</div> | |
</div> | |
<script src="http://arquivos.weblibras.com.br/auto/wl-min.js"></script> | |
<script> | |
var wl = new WebLibras() || window; | |
</script> | |
<script> | |
window.onload = function() { | |
function translate() { | |
var toTranslate = document.getElementById("to-translate"); | |
var translated = document.getElementById("translated"); | |
if (toTranslate.value.length > 0) { | |
wl.OpenText(toTranslate.value); | |
translated.value += "\n" + toTranslate.value; | |
toTranslate.value = ""; | |
} | |
} | |
var start = document.getElementsByClassName("start")[0]; | |
start.addEventListener("click", translate, false); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment