Created
October 19, 2015 02:14
-
-
Save joffilyfe/f01e27a4ca0ff7c40d92 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"> | |
<title></title> | |
<style> | |
.start { | |
padding: 15px; | |
border: 1px solid #ccc; | |
} | |
</style> | |
</head> | |
<body> | |
<p>Antes de iniciar, clique <strong>aqui</strong>!</p> | |
<div class="page-container not-translate"> | |
<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 type="text/javascript"> | |
var _hta = {'_setToken': '565300118759a71e1a97fba7074d4864f0762336','_htException': 'HandTalk_EXCECAO,.not-translate'}; | |
(function() { | |
var ht = document.createElement('script'); | |
ht.type = 'text/javascript'; ht.async = true; | |
ht.src = 'http://api.handtalk.me/handtalk_init.js'; | |
var s = document.getElementsByTagName('script')[0]; | |
s.parentNode.appendChild(ht); | |
})(); | |
</script> | |
<script> | |
window.onload = function() { | |
function translate() { | |
var toTranslate = document.getElementById("to-translate"); | |
var translated = document.getElementById("translated"); | |
if (toTranslate.value.length > 0) { | |
falaHugo(toTranslate.value); | |
// alert(toTranslate.value + "...."); | |
translated.value += "\n" + toTranslate.value; | |
toTranslate.value = ""; | |
} else { | |
alert('else..'); | |
} | |
} | |
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