mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-08 23:06:46 +02:00
Minor changes.
This commit is contained in:
@@ -29,7 +29,7 @@ h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h
|
|||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
|
||||||
### v0.18 - *2012-02-??*
|
### v0.18 - *2012-02-24*
|
||||||
|
|
||||||
* adds optional QRCode display
|
* adds optional QRCode display
|
||||||
* adds optional filtering for displayed files and folders
|
* 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 = {
|
var Base64 = {
|
||||||
|
|
||||||
// private property
|
// private property
|
||||||
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
||||||
|
|
||||||
// public method for encoding
|
// public method for encoding
|
||||||
encode : function (input) {
|
encode : function (input) {
|
||||||
var output = "";
|
var output = "";
|
||||||
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
||||||
var i = 0;
|
var i = 0;
|
||||||
@@ -35,10 +41,10 @@ encode : function (input) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
},
|
},
|
||||||
|
|
||||||
// public method for decoding
|
// public method for decoding
|
||||||
decode : function (input) {
|
decode : function (input) {
|
||||||
var output = "";
|
var output = "";
|
||||||
var chr1, chr2, chr3;
|
var chr1, chr2, chr3;
|
||||||
var enc1, enc2, enc3, enc4;
|
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");
|
string = string.replace(/\r\n/g,"\n");
|
||||||
var utftext = "";
|
var utftext = "";
|
||||||
|
|
||||||
@@ -99,10 +102,10 @@ _utf8_encode : function (string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return utftext;
|
return utftext;
|
||||||
},
|
},
|
||||||
|
|
||||||
// private method for UTF-8 decoding
|
// private method for UTF-8 decoding
|
||||||
_utf8_decode : function (utftext) {
|
_utf8_decode : function (utftext) {
|
||||||
var string = "";
|
var string = "";
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var c = c1 = c2 = 0;
|
var c = c1 = c2 = 0;
|
||||||
@@ -130,6 +133,5 @@ _utf8_decode : function (utftext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user