Deploying to built from @ 2c08238259 🚀

This commit is contained in:
pulsejet 2020-10-19 06:49:10 +00:00
parent 3cd3eb5a31
commit 2c8df35ec7
4 changed files with 227 additions and 40 deletions

20
js/drive.js Normal file
View file

@ -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;
}