diff options
author | Jose Antonio Marquez Russo | 2012-07-31 18:53:59 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-07-31 22:01:12 -0700 |
commit | 91cab8f2a995e9c2d4b2c7f9b79d2727f3b0f5d8 (patch) | |
tree | 2cc05b082bbc598a06e4ded625940a3a94f89b6e /js | |
parent | 04b1e2f99fcc47275c43065e63e5cabbd8b97500 (diff) | |
download | ninja-91cab8f2a995e9c2d4b2c7f9b79d2727f3b0f5d8.tar.gz |
Fix: Replacing deprecated blobBuilder
Fixes issues with copying library files from File System. Need to fix ArrayBuffer, but this is just a warning that does not break functionality.
Diffstat (limited to 'js')
-rw-r--r-- | js/io/system/chromeapi.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/js/io/system/chromeapi.js b/js/io/system/chromeapi.js index e46894d3..e33406ee 100644 --- a/js/io/system/chromeapi.js +++ b/js/io/system/chromeapi.js | |||
@@ -96,7 +96,7 @@ exports.ChromeApi = Montage.create(Object.prototype, { | |||
96 | // | 96 | // |
97 | f.createWriter(function(writer) { | 97 | f.createWriter(function(writer) { |
98 | // | 98 | // |
99 | var mime, blob = new window.WebKitBlobBuilder, type = filePath.split('.'); | 99 | var mime, blob, type = filePath.split('.'); |
100 | type = type[type.length-1]; | 100 | type = type[type.length-1]; |
101 | switch (type) { | 101 | switch (type) { |
102 | case 'bmp': | 102 | case 'bmp': |
@@ -137,8 +137,9 @@ exports.ChromeApi = Montage.create(Object.prototype, { | |||
137 | break; | 137 | break; |
138 | } | 138 | } |
139 | // | 139 | // |
140 | blob.append(content); | 140 | blob = new Blob([content], {type: type}); |
141 | writer.write(blob.getBlob(mime)); | 141 | // |
142 | writer.write(blob); | ||
142 | // | 143 | // |
143 | if (callback) callback(true); | 144 | if (callback) callback(true); |
144 | }, function (e) {if (callback) callback(false)}); | 145 | }, function (e) {if (callback) callback(false)}); |