import { client } from "../client"; import { unescapeChat, safeTags } from "../encoding"; import { getFilenameFromPath } from "../utils/paths"; export const addTrack = (trackname: string) => { const newentry = document.createElement("OPTION"); const songName = getFilenameFromPath(trackname); newentry.text = safeTags(unescapeChat(songName)); newentry.value = trackname; (document.getElementById("client_musiclist")).options.add( newentry, ); client.musics.push(trackname); };