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, but maybe yours too.

目前为 2018-01-28 提交的版本。查看 最新版本

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

The solution 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 do whatever seemed necessary 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.