Skip to content

Commit

Permalink
update base64.html
Browse files Browse the repository at this point in the history
  • Loading branch information
dankogai committed Nov 12, 2023
1 parent 51cf7ce commit 4633611
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions base64.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- $Id: base64.html,v 1.1 2009/03/01 22:00:28 dankogai Exp dankogai $ -->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>Demo for base64.js</title>
</head>
<body>
<h1>Demo for base64.js</h1>
<p>$Id: base64.html,v 1.1 2009/03/01 22:00:28 dankogai Exp dankogai $</p>
<table width="640"><tbody>
<tr><th width="50%">Text</th><th>Base64
(URL Safe <input id="encodeURI" type="checkbox" onclick="doit()">)</th></tr>
Expand All @@ -17,13 +15,12 @@ <h1>Demo for base64.js</h1>
<th><textarea id="base64" cols="32" rows="4" onkeyup="
$('srctxt').value = Base64.decode(this.value);
doit();
if (1 /*@cc_on -1 @*/) $('data').src = 'data:text/plain;base64,' + this.value;
"></textarea></th>
</tr>
<tr><th width="50%">Roundtrip</th><th>iframe w/ data: (no IE)</th></tr>
<tr><th width="50%">Roundtrip</th><th></th></tr>
<tr>
<th><textarea id="roundtrip" cols="32" rows="4" disabled></textarea></th>
<th><iframe id="data" width="80%" height="64"></iframe></th>
<th></th>
</tr>
</tbody></table>

Expand All @@ -36,10 +33,6 @@ <h1>Demo for base64.js</h1>
'encode' + ($('encodeURI').checked ? 'URI' : '')
]($('srctxt').value);
$('base64').value = encoded;
if (1 /*@cc_on -1 @*/) {
$('data').src = 'data:text/plain;base64,'
+ Base64.encode(Base64.decode(encoded));
}
$('roundtrip').value = Base64.decode(encoded);
}
</script>
Expand Down

0 comments on commit 4633611

Please sign in to comment.