Skip to content

Commit 5ccd236

Browse files
author
Davit Barbakadze
committed
Update js.
1 parent dd4b7f4 commit 5ccd236

File tree

5 files changed

+36
-45
lines changed

5 files changed

+36
-45
lines changed

js/moxie.js

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
;var MXI_DEBUG = true;
22
/**
33
* mOxie - multi-runtime File API & XMLHttpRequest L2 Polyfill
4-
* v1.5.5
4+
* v1.5.6
55
*
66
* Copyright 2013, Moxiecode Systems AB
77
* Released under GPL License.
88
*
99
* License: http://www.plupload.com/license
1010
* Contributing: http://www.plupload.com/contributing
1111
*
12-
* Date: 2017-08-26
12+
* Date: 2017-10-02
1313
*/
1414
;(function (global, factory) {
1515
var extract = function() {
@@ -1447,10 +1447,15 @@ define("moxie/core/utils/Env", [
14471447
return false;
14481448
},
14491449

1450-
use_blob_uri: (function() {
1450+
use_blob_uri: function() {
14511451
var URL = window.URL;
1452-
return URL && 'createObjectURL' in URL && 'revokeObjectURL' in URL;
1453-
}()),
1452+
caps.use_blob_uri = (URL &&
1453+
'createObjectURL' in URL &&
1454+
'revokeObjectURL' in URL &&
1455+
(Env.browser !== 'IE' || Env.verComp(Env.version, '11.0.46', '>=')) // IE supports createObjectURL, but not fully, for example it fails to use it as a src for the image
1456+
);
1457+
return caps.use_blob_uri;
1458+
},
14541459

14551460
// ideas for this heavily come from Modernizr (http://modernizr.com/)
14561461
use_data_uri: (function() {
@@ -9365,8 +9370,7 @@ define("moxie/runtime/html5/image/Image", [
93659370
if (blob.isDetached()) {
93669371
_binStr = blob.getSource();
93679372
_preload.call(this, _binStr);
9368-
} else if (Env.can('use_blob_uri')) {
9369-
_preload.call(this, URL.createObjectURL(blob.getSource()));
9373+
return;
93709374
} else {
93719375
_readAsDataUrl.call(this, blob.getSource(), function(dataUrl) {
93729376
if (asBinary) {
@@ -9378,23 +9382,15 @@ define("moxie/runtime/html5/image/Image", [
93789382
},
93799383

93809384
loadFromImage: function(img, exact) {
9381-
var comp = this;
9382-
comp.meta = img.meta;
9385+
this.meta = img.meta;
93839386

93849387
_blob = new File(null, {
93859388
name: img.name,
93869389
size: img.size,
93879390
type: img.type
93889391
});
93899392

9390-
if (Env.can('create_canvas') && !exact) {
9391-
_canvas = img.getAsCanvas();
9392-
setTimeout(function() {
9393-
comp.trigger('load');
9394-
});
9395-
} else {
9396-
_preload.call(this, exact ? (_binStr = img.getAsBinaryString()) : img.getAsDataURL());
9397-
}
9393+
_preload.call(this, exact ? (_binStr = img.getAsBinaryString()) : img.getAsDataURL());
93989394
},
93999395

94009396
getInfo: function() {
@@ -9483,7 +9479,7 @@ define("moxie/runtime/html5/image/Image", [
94839479
var quality = arguments[1] || 90;
94849480

94859481
// if image has not been modified, return the source right away
9486-
if (!_modified && _img.src.substr(0, 5) === 'data:') {
9482+
if (!_modified) {
94879483
return _img.src;
94889484
}
94899485

@@ -9602,7 +9598,6 @@ define("moxie/runtime/html5/image/Image", [
96029598

96039599
function _preload(str) {
96049600
var comp = this;
9605-
var prefix = str.substr(0, 5);
96069601

96079602
_img = new Image();
96089603
_img.onerror = function() {
@@ -9613,7 +9608,7 @@ define("moxie/runtime/html5/image/Image", [
96139608
comp.trigger('load');
96149609
};
96159610

9616-
_img.src = (prefix === 'data:' || prefix === 'blob:' ? str : _toDataUrl(str, _blob.type));
9611+
_img.src = str.substr(0, 5) == 'data:' ? str : _toDataUrl(str, _blob.type);
96179612
}
96189613

96199614

@@ -9715,10 +9710,6 @@ define("moxie/runtime/html5/image/Image", [
97159710
_imgInfo = null;
97169711
}
97179712

9718-
if (_img && Env.can('use_blob_uri')) {
9719-
URL.revokeObjectURL(_img.src);
9720-
}
9721-
97229713
_binStr = _img = _canvas = _blob = null;
97239714
_modified = false;
97249715
}

js/moxie.min.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/plupload.dev.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/**
22
* Plupload - multi-runtime File Uploader
3-
* v2.3.3
3+
* v2.3.4
44
*
55
* Copyright 2013, Moxiecode Systems AB
66
* Released under GPL License.
77
*
88
* License: http://www.plupload.com/license
99
* Contributing: http://www.plupload.com/contributing
1010
*
11-
* Date: 2017-08-28
11+
* Date: 2017-10-02
1212
*/
1313
;(function (global, factory) {
1414
var extract = function() {
@@ -112,7 +112,7 @@ var plupload = {
112112
* @static
113113
* @final
114114
*/
115-
VERSION : '2.3.3',
115+
VERSION : '2.3.4',
116116

117117
/**
118118
* The state of the queue before it has started and after it has finished

js/plupload.full.min.js

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)