YouTube - Toggle videos buttons

Adds buttons to filter out videos by type and/or status. The toggles can be hidden/shown at any time by pressing the button added to the header.

< 腳本YouTube - Toggle videos buttons的回應

評論:普通 - 腳本能使用,但有一些問題

§
發表於:2023-03-11

Nice script, but if you want to undo the changes you should reload the page. Also maybe it's possible to implement an "auto" button, so that you shouldn't tap on it each time loading the new page?

§
發表於:2023-03-11

Or maybe instead of "auto" just to make it remember the button state.

§
發表於:2023-03-13

I have tried pulling that several times but it woudl require hooking up events to hide the videos each time YT loads more and I had issues getting the events to trigger. Also, YT loads sections lazily so it might happen that the subscription section isn't loaded at startup and is loaded at a later time, which I don't know how to detect.

Most of the issues could be fixed with an interval, but this would slow down the page and performance is already an issue to me so I don't feel comfortable with that approach.

With that said, I haven't exactly given up. I just can't figure out how to implement that properly.

§
發表於:2023-03-13

Buttons have been turned into toggles now and remember their last state.
I have been testing different approaches and measuring performance and, while I still am not fully satisfied with the result, this was the best I could come up with at the moment.

發表回覆

登入以回覆