20 lines
576 B
JavaScript
20 lines
576 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('/np', MakaiDevIndex, 10);
|
||
|
if(location.pathname === '/') MakaiDevIndex();
|
||
|
})();
|