We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a90d860 + 87de9a0 commit f0af61aCopy full SHA for f0af61a
parallel.js
@@ -17,13 +17,10 @@ var Parallel = (function () {
17
funcs: []
18
};
19
20
- var isUrl = function (test) {
21
- var r = new RegExp('^(http|https|file)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+&%\$#\=~])*$');
22
- return r.test(test);
23
- }
24
-
25
var makeUrl = function (fileName) {
26
- return isUrl(fileName) ? fileName : [window.location.origin, fileName].join('/');
+ var link = document.createElement("link");
+ link.href = fileName;
+ return link.href;
27
28
29
var setter = function () {
0 commit comments