summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.js b/main.js
index 42895b4..4d6c037 100644
--- a/main.js
+++ b/main.js
@@ -120,12 +120,12 @@ function convert(input, mode) {
return result;
}
-convertBtn.addEventListener("click", () => {
- mode = modeBtn.value == "0" ? true : false;
+convertBtn.onclick = event => {
+ mode = modeBtn.value == "0" ? false : true;
var res = convert(input.value, mode);
output.innerText = res;
-});
+}
-copyBtn.addEventListener("click", () => {
+copyBtn.onclick = event => {
navigator.clipboard.writeText(output.innerText);
-}); \ No newline at end of file
+} \ No newline at end of file