mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-28 14:04:45 -04:00
Minor changes.
This commit is contained in:
parent
041c172a55
commit
cdb0f9035d
2 changed files with 105 additions and 103 deletions
|
@ -29,7 +29,7 @@ h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h
|
|||
## Changelog
|
||||
|
||||
|
||||
### v0.18 - *2012-02-??*
|
||||
### v0.18 - *2012-02-24*
|
||||
|
||||
* adds optional QRCode display
|
||||
* adds optional filtering for displayed files and folders
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
|
||||
/*
|
||||
* taken from here:
|
||||
* http://www.webtoolkit.info/javascript-base64.html
|
||||
* with minor modifications
|
||||
*/
|
||||
var Base64 = {
|
||||
|
||||
// private property
|
||||
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
||||
// private property
|
||||
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
||||
|
||||
// public method for encoding
|
||||
encode : function (input) {
|
||||
// public method for encoding
|
||||
encode : function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
|
@ -35,10 +41,10 @@ encode : function (input) {
|
|||
}
|
||||
|
||||
return output;
|
||||
},
|
||||
},
|
||||
|
||||
// public method for decoding
|
||||
decode : function (input) {
|
||||
// public method for decoding
|
||||
decode : function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
|
@ -68,14 +74,11 @@ decode : function (input) {
|
|||
|
||||
}
|
||||
|
||||
output = Base64._utf8_decode(output);
|
||||
return Base64._utf8_decode(output);
|
||||
},
|
||||
|
||||
return output;
|
||||
|
||||
},
|
||||
|
||||
// private method for UTF-8 encoding
|
||||
_utf8_encode : function (string) {
|
||||
// private method for UTF-8 encoding
|
||||
_utf8_encode : function (string) {
|
||||
string = string.replace(/\r\n/g,"\n");
|
||||
var utftext = "";
|
||||
|
||||
|
@ -99,10 +102,10 @@ _utf8_encode : function (string) {
|
|||
}
|
||||
|
||||
return utftext;
|
||||
},
|
||||
},
|
||||
|
||||
// private method for UTF-8 decoding
|
||||
_utf8_decode : function (utftext) {
|
||||
// private method for UTF-8 decoding
|
||||
_utf8_decode : function (utftext) {
|
||||
var string = "";
|
||||
var i = 0;
|
||||
var c = c1 = c2 = 0;
|
||||
|
@ -130,6 +133,5 @@ _utf8_decode : function (utftext) {
|
|||
}
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue