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

25 lines
650 B
JavaScript
Raw Normal View History

2024-04-24 14:52:11 +00:00
#include elem.js
#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);
};
runIfPathStartsWith('/tools/ascii', MakaiASCII);
runIfPathStartsWith('/tools/whois', MakaiWHOIS);
const nowPlaying = MakaiNowPlayingInit(header);
2024-04-24 02:24:00 +00:00
return {
get header() { return header; },
get nowPlaying() { return nowPlaying; },
};
2024-04-24 02:24:00 +00:00
})();