Greasy Fork

Sky News AutoPlay Disabler

This script prevents the Sky News website from auto-playing (often unrelated) videos after the current one has ended. BBC News provide a toggle, but Sky News doesn't. Until they introduce one, this workaround is for my own sanity.

作者
Gideon Pyzer
日安装量
0
总安装量
21
评分
1 0 0
版本
0.1
创建于
2018-01-28
更新于
2018-01-28
大小
1.9 KB
许可证
暂无
适用于

This is a complete hack that will likely break as the website changes or if React changes. It works by listening for DOM changes, and if the playing screen gets added (as a result of hitting play), the `preventShowNext` handler will get the internal React component and update it's state to prevent the next video from playing. MutationObserver is slow, and will probably degrade the website's performance, but it's not a SPA so might be Ok.