Alt. updates; Build system tweaks

This commit is contained in:
2024-09-14 23:01:50 +02:00
parent 9b23a57eeb
commit 9a20834ac0
7 changed files with 759 additions and 698 deletions

28
patched-requests.js Normal file
View File

@ -0,0 +1,28 @@
(function(){
if (window.URL) {
var _URL = window.URL;
window.URL = (function URL (url, base) {
try {
return new (Function.prototype.bind.apply(_URL, [{}].concat([url, base])));
} catch (err) {
url = (
window.SpaccDotWebServer.staticFilesData[url] ||
window.SpaccDotWebServer.staticFilesData[`./${url}`] ||
url);
return { href: url, toString: (function(){ return url; }) };
}
});
}
if (window.fetch) {
var _fetch = window.fetch;
window.fetch = (function fetch (resource, options) {
return _fetch((
window.SpaccDotWebServer.staticFilesData[resource] ||
window.SpaccDotWebServer.staticFilesData[`./${resource}`] ||
resource), options);
});
}
})();