<repo_name>shreydd/ferb-latin<file_sep>/script.js
var btn = document.querySelector('.btn-translate');
var inputText;
var outputWindow = document.querySelector('.outputArea');
var url = 'https://api.funtranslations.com/translate/ferb-latin.json';
// var url = 'https://lessonfourapi.tanaypratap.repl.co/translate/yoda.json';

function translateURL(text) {
    return url + '?' + 'text=' + text
}

function getinput() {
    inputText = document.querySelector('.inp-text').value;

}

function translateHandler() {
    getinput();
    fetch(translateURL(inputText))
        .then(response => response.json())
        .then(json => {
            var translatedText = json.contents.translated;
            outputWindow.innerHTML = translatedText;
            // console.log(json.contents.text);
        })
        .catch(errorHandler)
}

btn.addEventListener('click', translateHandler);

function errorHandler(error) {
    alert("Looks like there's an issue, visit us back again after an hour");
}<file_sep>/README.md
# ferb-latin
A Language translator that converts english to phineas and ferb's own language
