Closed MerielVaren closed 2 months ago
啊,这个东西还挺重要的,影响有点严重了,我研究一下
https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent
主要是在脚本猫中的消息交互有用到
请问什么时候会触发?
我使用128.0.6559.0(正式版本)dev (arm64)
,脚本猫 v0.16.4,运行上述脚本,暂未复现
浏览器:Chrome Dev 128.0.6559.0 网址:https://www.youtube.com/shorts/8Og5ZESMi8s 脚本猫版本:0.16.4 (github release) / 0.16.3 (chrome网上应用商店) 插件地址:https://greasyfork.org/zh-CN/scripts/487271-better-youtube-shorts 报错信息:MutationEvent is not defined
以上运行环境下稳定触发上述的报错 @CodFrm
当我在相同的运行环境下使用另一个用到MutationObserver的插件去除链接重定向访问bing - hello时,Chrome Dev给出了更多的报错信息
content.ts在通信时用到了MutationEvent,有没有可能换成CustomEvent等其他方法来绕过MutationEvnet?
希望对作者有所帮助
啊,这个东西还挺重要的,影响有点严重了,我研究一下
https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent
主要是在脚本猫中的消息交互有用到
是的,我认为这个bug需要及时得到修复,因为根据时间表来看,Chrome稳定版将在7月23日升到v127,如果不修复的话彼时可能所有带有MutationObserver或MutationEvent的插件将不能正常工作
修复了,哥哥试试这个版本:https://github.com/scriptscat/scriptcat/actions/runs/9901910434
主要影响到使用了GM_addElement/addStyle的脚本
没问题的话,我会尽快发布这个版本
我这边测了一下没有报错了
脚本地址:更好的 Youtube Shorts
运行环境为:Chrome Dev 128.0.6559.0
运行环境为:Chrome 126.0.6478.127
MutationEvent从127开始被移除,但是我并没有使用MutationEvent,我在脚本中只使用了MutationObserver,而MutationObserver并没有被弃用
已知可以在用户端把chrome://flags/#mutation-events设置为Enabled解决这个问题,脚本猫是否可以像https://github.com/Tampermonkey/tampermonkey/issues/2011#issuecomment-2022872478一样在之后的版本中修复这个问题