diff --git a/demos/datagrid/index.html b/demos/datagrid/index.html index ffd9268..158a798 100644 --- a/demos/datagrid/index.html +++ b/demos/datagrid/index.html @@ -34,7 +34,6 @@ a { text-decoration: none } ... or click here to select a file Advanced Demo Options: -Use readAsBinaryString: (when available)
@@ -80,22 +79,16 @@ var process_wb = (function() { })(); var do_file = (function() { - var rABS = typeof FileReader !== "undefined" && (FileReader.prototype||{}).readAsBinaryString; - var domrabs = document.getElementsByName("userabs")[0]; - if(!rABS) domrabs.disabled = !(domrabs.checked = false); - return function do_file(files) { - rABS = domrabs.checked; var f = files[0]; var reader = new FileReader(); reader.onload = function(e) { - if(typeof console !== 'undefined') console.log("onload", new Date(), rABS); + if(typeof console !== 'undefined') console.log("onload", new Date()); var data = e.target.result; - if(!rABS) data = new Uint8Array(data); - process_wb(X.read(data, {type: rABS ? 'binary' : 'array'})); + data = new Uint8Array(data); + process_wb(X.read(data, {type: 'array'})); }; - if(rABS) reader.readAsBinaryString(f); - else reader.readAsArrayBuffer(f); + reader.readAsArrayBuffer(f); }; })();