Hey thank you so much for this! I saw this months ago and finally got some time this morning to implement this it into my site. Your code was almost perfect, just needed to wrap the initial load of storedSwagEnable in a JSON.parse() as LocalStorage is always stored as a string. Thank you for taking time to help me out with this!
there is a JS inplementation of milkdrop called butterchurn (github: https://github.com/jberg/butterchurn). if you want a good example, look at the music thing i made for https://cvrsed.neocities.org/ (its the "music" entry in the sidebar)
aaaand there is also a JS implementation of winamp (https://github.com/captbaritone/webamp). if you want to see an example for that, i have one on my homeserver https://home.hacker3000.cf/
i was referring to your homepage! i am so inspired and i didnt believe it when i saw it. i will have to try and make this work as well one night. thank you so much
oh cool. btw: if you need skins: https://skins.webamp.org/