Skip to content

Commit

Permalink
Update base64.html
Browse files Browse the repository at this point in the history
  • Loading branch information
prayogak authored Apr 23, 2024
1 parent 05c692d commit 7cc7bd7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sc/html/base64.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
var input = document.getElementById("text-input").value.trim();
var output = document.getElementById("output");

if (input === "") {
output.innerText = "Input cannot be empty!";
return;
}

if (action === "decode") {
try {
var decoded = decodeURIComponent(escape(atob(input)));
Expand Down

0 comments on commit 7cc7bd7

Please sign in to comment.