Fix Brave Bug for YouTube Live Chat

To Fix Brave Bug for YouTube Live Chat

目前为 2024-10-29 提交的版本。查看 最新版本

作者
𝖢𝖸 𝖥𝗎𝗇𝗀
评分
0 0 0
版本
3.31
创建于
2023-08-30
更新于
2024-10-29
大小
2.2 KB
许可证
MIT
适用于

This is to fix the bug for Brave. (YouTube Live Chat)

Target User: Brave

See https://community.brave.com/t/youtube-live-chat-30-sec-delay/

Root Cause

YouTube calls "urlChanged" twice to set the iframe url. In the first attempt, chatframe.contentDocument is null. So it will set the src of the iframe. In the second attempt, chatframe.contentDocument is non-null. So it will set the url using chatframe.contentDocument.location.replace

Both Brave and Chrome will do these two attempts. Both attempts are just 10ms aparted.

The difference is, in brave, the first attempt affected the second attempt, but in chrome, the first attempt would not affect the second attempt.

Details in Github issue#25694

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址