diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-09-05 07:32:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-05 07:32:53 +0200 |
| commit | 6f72f845455f517b47da96c7d3d474c6582000fb (patch) | |
| tree | bfe3b3bbd32fffdbc99b87021752fb37cc77c8d4 /webAO | |
| parent | a49a318848ca7feee32853e78b0fabbde99768d9 (diff) | |
| parent | fb3590ad774a07f45eaaaeb2b443ae264c302f3b (diff) | |
Merge pull request #166 from caleb-mabry/prepping-dom-folder
Prep folder with example
Diffstat (limited to 'webAO')
| -rw-r--r-- | webAO/client.ts | 20 | ||||
| -rw-r--r-- | webAO/dom/musicListClick.ts | 21 | ||||
| -rw-r--r-- | webAO/index.ts | 0 |
3 files changed, 21 insertions, 20 deletions
diff --git a/webAO/client.ts b/webAO/client.ts index 5d5eb2c..3bf8854 100644 --- a/webAO/client.ts +++ b/webAO/client.ts @@ -1119,26 +1119,6 @@ export function resetICParams() { } window.musiclist_filter = musiclist_filter; -/** - * Triggered when an item on the music list is clicked. - * @param {MouseEvent} event - */ -export function musiclist_click(_event: Event) { - const playtrack = (<HTMLInputElement>( - document.getElementById("client_musiclist") - )).value; - client.sendMusicChange(playtrack); - - // This is here so you can't actually select multiple tracks, - // even though the select tag has the multiple option to render differently - const musiclist_elements = (<HTMLSelectElement>( - document.getElementById("client_musiclist") - )).selectedOptions; - for (let i = 0; i < musiclist_elements.length; i++) { - musiclist_elements[i].selected = false; - } -} -window.musiclist_click = musiclist_click; /** * Triggered when a character in the mute list is clicked diff --git a/webAO/dom/musicListClick.ts b/webAO/dom/musicListClick.ts new file mode 100644 index 0000000..8fd3be5 --- /dev/null +++ b/webAO/dom/musicListClick.ts @@ -0,0 +1,21 @@ +import { client } from "../client"; +/** + * Triggered when an item on the music list is clicked. + * @param {MouseEvent} event + */ +export function musiclist_click(_event: Event) { + const playtrack = (<HTMLInputElement>( + document.getElementById("client_musiclist") + )).value; + client.sendMusicChange(playtrack); + + // This is here so you can't actually select multiple tracks, + // even though the select tag has the multiple option to render differently + const musiclist_elements = (<HTMLSelectElement>( + document.getElementById("client_musiclist") + )).selectedOptions; + for (let i = 0; i < musiclist_elements.length; i++) { + musiclist_elements[i].selected = false; + } +} +window.musiclist_click = musiclist_click; diff --git a/webAO/index.ts b/webAO/index.ts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/webAO/index.ts |
