Closed c915 closed 1 year ago
Interesting proof of concept, I hadn't considered userscripts could arbitrarily connect to websockets on localhost.
My only hangup with this is, is that with this kind of sophistry and the fact the user has to actually add the scripts manually, that maybe some sort of webpack-style publishing system be used so that development is tidier.
I'm working on this now and it's going very well. When I submit my commit it will have a lot of redundant code between each userscript. I'm open to using npm+webpack to find a way to deploy scripts, but I don't know how to do that right now.
Maybe there's a factor or two I'm not considering, but what about WebExtensions? It's one of the few things the main browser devs could even slightly agree on. They're typically very lightweight as well.
i guess I could try to pack it as an extension, i've never done that before. I'm not going to do that right now though.
I can look into it; I've made a few in the past, and it was fairly painless.
Plus, it'd be nice to take a break from Wii internals for a bit.
don't try to commit anything until my next commit. It'll be very copy+paste once you see how I'm doing it.
Done but without a proper system for compiling userscripts. 140b22fac47055d15cddfbb8474d1a740557f0fd
You mentioned during your last stream that there existed a third-party service like this, but required you to run some weird user scripts.
Have you considered using a solution like that and just writing your own user scripts? That way you don't have to rely on headless_chrome being janky and weird.
Did a proof-of-concept implementation here, https://github.com/c915/stream-nexus, with youtube and odysee support.
User scripts are essentially the same as your observer, tested with Tampermonkey.