2024-04-24 14:52:11 +00:00
|
|
|
#include elem.js
|
2024-05-30 19:47:26 +00:00
|
|
|
#include elems/head.js
|
|
|
|
#include np/init.js
|
|
|
|
#include tools/ascii.js
|
|
|
|
#include tools/whois.js
|
|
|
|
|
|
|
|
const makai = (() => {
|
|
|
|
const header = new MakaiSiteHeader($q('.js-header'));
|
2024-04-24 02:24:00 +00:00
|
|
|
|
|
|
|
const runIfPathStartsWith = (prefix, func, ...args) => {
|
|
|
|
if(location.pathname === prefix || location.pathname.startsWith(`${prefix}/`))
|
|
|
|
func(...args);
|
|
|
|
};
|
|
|
|
|
2024-05-30 19:47:26 +00:00
|
|
|
runIfPathStartsWith('/tools/ascii', MakaiASCII);
|
|
|
|
runIfPathStartsWith('/tools/whois', MakaiWHOIS);
|
|
|
|
|
|
|
|
const nowPlaying = MakaiNowPlayingInit(header);
|
2024-04-24 02:24:00 +00:00
|
|
|
|
2024-05-30 19:47:26 +00:00
|
|
|
return {
|
|
|
|
get header() { return header; },
|
|
|
|
get nowPlaying() { return nowPlaying; },
|
|
|
|
};
|
2024-04-24 02:24:00 +00:00
|
|
|
})();
|