diff options
author | Mario <mario@mariovavti.com> | 2019-11-10 12:49:51 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-11-10 14:10:03 +0100 |
commit | 580c3f4ffe9608d2beb56d418c68b3b112420e76 (patch) | |
tree | 82335d01179ac361d3f547a4b8e8c598d302e9f3 /vendor/blueimp/jquery-file-upload/cors | |
parent | d22766f458a8539a40a57f3946459a9be1f21cd6 (diff) | |
download | volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.gz volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.bz2 volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.zip |
another bulk of composer updates
(cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce)
Diffstat (limited to 'vendor/blueimp/jquery-file-upload/cors')
-rw-r--r-- | vendor/blueimp/jquery-file-upload/cors/postmessage.html | 126 | ||||
-rw-r--r-- | vendor/blueimp/jquery-file-upload/cors/result.html | 22 |
2 files changed, 80 insertions, 68 deletions
diff --git a/vendor/blueimp/jquery-file-upload/cors/postmessage.html b/vendor/blueimp/jquery-file-upload/cors/postmessage.html index 381a8e0cd..5c90743af 100644 --- a/vendor/blueimp/jquery-file-upload/cors/postmessage.html +++ b/vendor/blueimp/jquery-file-upload/cors/postmessage.html @@ -1,4 +1,4 @@ -<!DOCTYPE HTML> +<!DOCTYPE html> <!-- /* * jQuery File Upload Plugin postMessage API @@ -12,64 +12,74 @@ */ --> <html lang="en"> -<head> -<meta charset="utf-8"> -<title>jQuery File Upload Plugin postMessage API</title> -<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" crossorigin="anonymous"></script> -</head> -<body> -<script> -/*jslint unparam: true, regexp: true */ -/*global $, Blob, FormData, location */ -'use strict'; -var origin = /^http:\/\/example.org/, - target = new RegExp('^(http(s)?:)?\\/\\/' + location.host + '\\/'); -$(window).on('message', function (e) { - e = e.originalEvent; - var s = e.data, - xhr = $.ajaxSettings.xhr(), - f; - if (!origin.test(e.origin)) { - throw new Error('Origin "' + e.origin + '" does not match ' + origin); - } - if (!target.test(e.data.url)) { - throw new Error('Target "' + e.data.url + '" does not match ' + target); - } - $(xhr.upload).on('progress', function (ev) { - ev = ev.originalEvent; - e.source.postMessage({ - id: s.id, - type: ev.type, - timeStamp: ev.timeStamp, - lengthComputable: ev.lengthComputable, - loaded: ev.loaded, - total: ev.total - }, e.origin); - }); - s.xhr = function () { - return xhr; - }; - if (!(s.data instanceof Blob)) { - f = new FormData(); - $.each(s.data, function (i, v) { - f.append(v.name, v.value); + <head> + <meta charset="utf-8" /> + <title>jQuery File Upload Plugin postMessage API</title> + <script + src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" + integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" + crossorigin="anonymous" + ></script> + </head> + <body> + <script> + 'use strict'; + var origin = /^https:\/\/example.org/, + target = new RegExp('^(http(s)?:)?\\/\\/' + location.host + '\\/'); + $(window).on('message', function(e) { + e = e.originalEvent; + var s = e.data, + xhr = $.ajaxSettings.xhr(), + f; + if (!origin.test(e.origin)) { + throw new Error('Origin "' + e.origin + '" does not match ' + origin); + } + if (!target.test(e.data.url)) { + throw new Error( + 'Target "' + e.data.url + '" does not match ' + target + ); + } + $(xhr.upload).on('progress', function(ev) { + ev = ev.originalEvent; + e.source.postMessage( + { + id: s.id, + type: ev.type, + timeStamp: ev.timeStamp, + lengthComputable: ev.lengthComputable, + loaded: ev.loaded, + total: ev.total + }, + e.origin + ); }); - s.data = f; - } - $.ajax(s).always(function (result, statusText, jqXHR) { - if (!jqXHR.done) { + s.xhr = function() { + return xhr; + }; + if (!(s.data instanceof Blob)) { + f = new FormData(); + $.each(s.data, function(i, v) { + f.append(v.name, v.value); + }); + s.data = f; + } + $.ajax(s).always(function(result, statusText, jqXHR) { + if (!jqXHR.done) { jqXHR = result; result = null; - } - e.source.postMessage({ - id: s.id, - status: jqXHR.status, - statusText: statusText, - result: result, - headers: jqXHR.getAllResponseHeaders() - }, e.origin); - }); -}); -</script> -</body> + } + e.source.postMessage( + { + id: s.id, + status: jqXHR.status, + statusText: statusText, + result: result, + headers: jqXHR.getAllResponseHeaders() + }, + e.origin + ); + }); + }); + </script> + </body> </html> diff --git a/vendor/blueimp/jquery-file-upload/cors/result.html b/vendor/blueimp/jquery-file-upload/cors/result.html index e3d629814..f2a1b4b6a 100644 --- a/vendor/blueimp/jquery-file-upload/cors/result.html +++ b/vendor/blueimp/jquery-file-upload/cors/result.html @@ -1,4 +1,4 @@ -<!DOCTYPE HTML> +<!DOCTYPE html> <!-- /* * jQuery Iframe Transport Plugin Redirect Page @@ -12,13 +12,15 @@ */ --> <html lang="en"> -<head> -<meta charset="utf-8"> -<title>jQuery Iframe Transport Plugin Redirect Page</title> -</head> -<body> -<script> -document.body.innerText=document.body.textContent=decodeURIComponent(window.location.search.slice(1)); -</script> -</body> + <head> + <meta charset="utf-8" /> + <title>jQuery Iframe Transport Plugin Redirect Page</title> + </head> + <body> + <script> + document.body.innerText = document.body.textContent = decodeURIComponent( + window.location.search.slice(1) + ); + </script> + </body> </html> |