diff --git a/extra/js/drive.js b/extra/js/drive.js new file mode 100644 index 0000000..54391c3 --- /dev/null +++ b/extra/js/drive.js @@ -0,0 +1,20 @@ +// https://stackoverflow.com/a/9458996 +function _bytesToBase64(bytes) { + var binary = ''; + var len = bytes.byteLength; + for (var i = 0; i < len; i++) { + binary += String.fromCharCode(bytes[i]); + } + return window.btoa(binary); +} + +// https://stackoverflow.com/a/21797381 +function _base64ToBytes(base64) { + var binary_string = window.atob(base64); + var len = binary_string.length; + var bytes = new Uint8Array(len); + for (var i = 0; i < len; i++) { + bytes[i] = binary_string.charCodeAt(i); + } + return bytes; +} diff --git a/extra/shell.html b/extra/shell.html index 6876732..ff790a8 100644 --- a/extra/shell.html +++ b/extra/shell.html @@ -3,8 +3,10 @@
+ +