Updated JS stuffs.

This commit is contained in:
flash 2025-03-20 21:49:41 +00:00
commit 452eeb22d6
Signed by: flash
GPG key ID: 2C9C2C574D47FE3E
21 changed files with 267 additions and 412 deletions

View file

@ -1,9 +1,8 @@
#include utility.js
#include np/client.js
#include np/element.jsx
const MakaiNowPlayingInit = siteHeader => {
const target = $q('.js-np-target');
const target = $query('.js-np-target');
if(!(target instanceof Element))
return;
@ -13,7 +12,7 @@ const MakaiNowPlayingInit = siteHeader => {
const client = new MakaiNowPlaying(userName);
const element = new MakaiNowPlayingElement;
$rp(target, element.element);
target.replaceWith(element.element);
const update = () => {
client.fetch().then(result => {