diff options
| author | ruki <waruqi@gmail.com> | 2018-11-08 00:38:48 +0800 |
|---|---|---|
| committer | ruki <waruqi@gmail.com> | 2018-11-07 21:53:09 +0800 |
| commit | 26105034da4fcce7ac883c899d781f016559310d (patch) | |
| tree | c459a5dc4e3aa0972d9919033ece511ce76dd129 /node_modules/js-base64/base64.html | |
| parent | 2c77f00f1a7ecb6c8192f9c16d3b2001b254a107 (diff) | |
| download | xmake-docs-26105034da4fcce7ac883c899d781f016559310d.tar.gz xmake-docs-26105034da4fcce7ac883c899d781f016559310d.zip | |
switch to vuepress
Diffstat (limited to 'node_modules/js-base64/base64.html')
| -rw-r--r-- | node_modules/js-base64/base64.html | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/node_modules/js-base64/base64.html b/node_modules/js-base64/base64.html new file mode 100644 index 00000000..dd183057 --- /dev/null +++ b/node_modules/js-base64/base64.html @@ -0,0 +1,47 @@ +<!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 $ --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; 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> +<tr> +<th><textarea id="srctxt" cols="32" rows="4" onkeyup="doit()"> +</textarea></th> +<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><textarea id="roundtrip" cols=32" rows="4" disabled></textarea></th> +<th><iframe id="data" width="80%" height="64"></iframe></th> +</tr> +</tbody></table> + + +<script src="./base64.js"></script> +<script> +$ = function(id){ return document.getElementById(id) }; +function doit(){ + var encoded = Base64[ + '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> +</body> +</html> |
