chrome_ext/cscript_common.js
// FIXME: this does not work in Firefox :(
this does not work in Firefox :(
this does not work in Firefox : (
function readFileAsArrayBufferAsync(file){
    let reader = new FileReader();
    return new Promise((resolve,reject)=> {
                reader.onload = x=>resolve(reader.result);
                reader.readAsArrayBuffer(file);
        }
    );
}
function readFileAsArrayBufferAsync ( file ) { let reader = new FileReader ( ) ; return new Promise ( ( resolve , reject ) => { reader . onload = x => resolve ( reader . result ) ; reader . readAsArrayBuffer ( file ) ; } ) ; }
FIXME: this does not work in Firefox :(
FIXME : this does not work in Firefox : (