grubeninspekteur / BetterRBTV

Web extension for YouTube Live chats.
MIT License
21 stars 6 forks source link

Works only after a refresh on YouTube Live #26

Closed grubeninspekteur closed 8 years ago

grubeninspekteur commented 8 years ago

The new chat detection which enables the extension without a log in does not work on YouTube Live (not Gaming). Only after a refresh the necessary element is detected.

DoomDesign commented 8 years ago

maybe there is an YouTube-own event we could use to listen to?

grubeninspekteur commented 8 years ago

Content scripts are not allowed to interact with JavaScript already on the page

grubeninspekteur commented 8 years ago

Can't test now, but I suspect AJAX ruining everything. We could keep the check timer alive, which does not use much CPU, but is something I wanted to avert. Another possibility would be a MutationObserver for the part of the page that is replaced by AJAX. This would also work if you visit a live stream after visiting a live stream, i.e. you change the contents twice.