flash.moe/assets/makai.js/main.js

21 lines
604 B
JavaScript
Raw Normal View History

2024-04-24 14:52:11 +00:00
#include elem.js
2024-04-24 02:24:00 +00:00
#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);
2024-04-24 13:06:02 +00:00
runIfPathStartsWith('/now-listening', MakaiDevIndex, 10);
2024-04-24 02:24:00 +00:00
if(location.pathname === '/') MakaiDevIndex();
})();