Checklist
Describe the bug
When the live stream page is refreshed, messages already filtered before the refresh are no longer visible when ytcfilter reopen.
Steps To Reproduce
- Open a live stream and wait for some messages to be filtered and displayed in ytcfilter.
- Refresh the page.
Expected behavior
Previously filtered messages should still be visible after a refresh.
What browsers are you seeing the problem on?
Chrome
Anything else?
If I look in archives in ytcfilter settings I can see the messages previously filtered, but there is no video id or title (which I think is the cause of the refresh issue).
Looking a bit at the code, I see the chat-interceptor.ts is supposed to get video/channel info, but fail with "Cannot read properties of undefined (reading '__dataHost')". It looks like the following property is no longer available (window as any).parent.yt.config_.SBOX_SETTINGS.SEARCHBOX_COMPONENT, not sure why but maybe a change on youtube side.
I checked if this was available elsewhere and found another property in the window ytInitialData that looks promising. I think that changing the code that get video/channel info to use (window as any).parent.ytInitialData.contents.twoColumnWatchNextResults... instead may work.
Checklist
Describe the bug
When the live stream page is refreshed, messages already filtered before the refresh are no longer visible when ytcfilter reopen.
Steps To Reproduce
Expected behavior
Previously filtered messages should still be visible after a refresh.
What browsers are you seeing the problem on?
Chrome
Anything else?
If I look in archives in ytcfilter settings I can see the messages previously filtered, but there is no video id or title (which I think is the cause of the refresh issue).
Looking a bit at the code, I see the
chat-interceptor.tsis supposed to get video/channel info, but fail with "Cannot read properties of undefined (reading '__dataHost')". It looks like the following property is no longer available(window as any).parent.yt.config_.SBOX_SETTINGS.SEARCHBOX_COMPONENT, not sure why but maybe a change on youtube side.I checked if this was available elsewhere and found another property in the window
ytInitialDatathat looks promising. I think that changing the code that get video/channel info to use(window as any).parent.ytInitialData.contents.twoColumnWatchNextResults...instead may work.