Greasy Fork

Unbreak Snapchat web. Disable focus tracking and screenshot prevention

This userscript improves the Snapchat web experience by disabling screenshot prevention features which don't prevent screenshots but do actively harm the usability.

目前为 2023-06-27 提交的版本。查看 最新版本

作者
varenc
评分
0 0 0
版本
0.1.1
创建于
2023-06-08
更新于
2023-06-27
大小
3.2 KB
许可证
MIT
适用于

This userscript makes Snapchat web more usable by disabling the their ill-guided attempts to prevent screenshots by monitoring control keys and tracking focus. These attempts by Snapchat do nothing to actually prevent screenshots, which they document as not being prevented, but they do actively harm the user experience. For example, say I want to reference my friend's trip info while in another browser window. When the page isn't focused the content is hidden.

This userscript just disables all that. It intercepts and blocks modifier keypress events and sets `document.hasFocus()` to always be true. This makes Snapchat web much more usable.

NOTE:Just updated this so it also prevents right-clicking from making Snapchat think you've lost focus. This also disabling being able to right-click on a message to react but I think that's a fair tradeoff since you can do that other ways. If you feel otherwise let me know! I love feedback in general.