diff options
-rw-r--r-- | js/io/system/chromeapi.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/js/io/system/chromeapi.js b/js/io/system/chromeapi.js index b13dd9de..ba0ed3f4 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, type = filePath.split('.'), version = parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10); | 99 | var mime, blob, type = filePath.split('.'); //version = parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10); |
100 | type = type[type.length-1]; | 100 | type = type[type.length-1]; |
101 | switch (type) { | 101 | switch (type) { |
102 | case 'bmp': | 102 | case 'bmp': |
@@ -136,12 +136,8 @@ exports.ChromeApi = Montage.create(Object.prototype, { | |||
136 | mime = 'text/'+type; | 136 | mime = 'text/'+type; |
137 | break; | 137 | break; |
138 | } | 138 | } |
139 | //TODO: Remove version checking once Chrome version 22 is stable | 139 | // |
140 | if (version > 21) { | 140 | blob = new Blob([new Uint8Array(content)], {type: type}); |
141 | blob = new Blob([new Uint8Array(content)], {type: type}); | ||
142 | } else { | ||
143 | blob = new Blob([content], {type: type}); | ||
144 | } | ||
145 | // | 141 | // |
146 | writer.write(blob); | 142 | writer.write(blob); |
147 | // | 143 | // |