21 lines
580 B
JavaScript
21 lines
580 B
JavaScript
|
window.htconfig = {
|
||
|
Style: {
|
||
|
'texture.cache': true
|
||
|
},
|
||
|
Default: {
|
||
|
// Resolve cross-domain issues
|
||
|
crossOrigin: 'anonymous',
|
||
|
convertURL: function(url) {
|
||
|
if (/^data:/.test(url) || /^blob:/.test(url)) {
|
||
|
return url;
|
||
|
}
|
||
|
|
||
|
var storagePrefix = /mini-browser/.test(window.location.href) ? '/a' :'storage';
|
||
|
if (storagePrefix && url && !/^http/.test(url) && !/^https/.test(url)) {
|
||
|
url = storagePrefix + '/' + url
|
||
|
}
|
||
|
return url;
|
||
|
}
|
||
|
}
|
||
|
};
|