flash.moe/assets/makai.js/main.js
2024-04-24 13:06:02 +00:00

19 lines
587 B
JavaScript

#include ascii.js
#include dev-index.js
#include dev-home.js
#include whois.js
(() => {
const runIfPathStartsWith = (prefix, func, ...args) => {
if(location.pathname === prefix || location.pathname.startsWith(`${prefix}/`))
func(...args);
};
runIfPathStartsWith('/ascii', MakaiASCII);
runIfPathStartsWith('/whois', MakaiWHOIS);
runIfPathStartsWith('/home', MakaiDevHome);
runIfPathStartsWith('/home', MakaiDevIndex, 10);
runIfPathStartsWith('/now-listening', MakaiDevIndex, 10);
if(location.pathname === '/') MakaiDevIndex();
})();