Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
Fix: console.log deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
JahunSeo committed May 18, 2018
1 parent b23ac06 commit 1e34d0d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ function isSupported({ source, target } = {}) {
}

function requestTranslate({ source, target, text } = {}) {
console.log(source, target, text);
return new Promise((resolve, reject) => {
apis
.translate({ source, target, text })
Expand All @@ -91,12 +90,10 @@ function requestTranslate({ source, target, text } = {}) {

function sendTranslatedText(e, result) {
// we may send a result Object including translatedText, source, target, text etc.
console.log(result);
e.sender.send("async-search", true, result.translatedText);
}

function errorHandling(e, err) {
console.log(err);
let message = "에러가 났네요. 다시 한 번 시도해주세요 :D";
if (err.name === "DetactError" || err.name === "TranslateError") {
message = err.message;
Expand All @@ -112,6 +109,5 @@ function errorHandling(e, err) {
else message += ": 다시 한 번 시도해주세요.";
}
}
console.log(message);
e.sender.send("async-search", false, message);
}
2 changes: 1 addition & 1 deletion views/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const searchPress = function(e) {
};
const search = window.document.getElementById("text");
search.onkeyup = function(event) {
const text = window.document.getElementById("text").value;s
const text = window.document.getElementById("text").value;
setTextFontSize(text, "text");
return searchPress(event);
};
Expand Down

0 comments on commit 1e34d0d

Please sign in to comment.