mirror of
https://github.com/photonstorm/phaser
synced 2024-12-18 09:03:29 +00:00
18 lines
298 B
JavaScript
18 lines
298 B
JavaScript
var GetURL = function (file, baseURL)
|
|
{
|
|
if (!file.url)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if (file.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/))
|
|
{
|
|
return file.url;
|
|
}
|
|
else
|
|
{
|
|
return baseURL + file.path + file.url;
|
|
}
|
|
};
|
|
|
|
module.exports = GetURL;
|