This is a script injectable by TamperMonkey (or similar) that attempts to bypass/skip Twitch's obnoxious mid-roll ad process when used in conjunction with effective adblocking filters/rules. This script itself won't block ads - it will skip the placeholder presented by Twitch (see purple image below under
Why) when ads are effectively blocked.
Twitch has very recently & noticeably ramped up its anti-adblock efforts in an effort to increase ad viewership across its platform, presumably to increase profits. There is currently a non-official workaround for blocking pre-roll (before stream starts) ads, but mid-roll ads are half blocked. Currently, mid-roll ads are blocked, but a pattern is emerging that Twitch is interrupting stream viewing with a notice regarding "third party tool[s]", specifically for those with ad-blockers in an effort to dissuade their use.
(Screenshot showing Twitch notice when an adblocker is used. Because not loading ads is "impacting site performance", and watching ads results in "the best Twitch experience" /s. Blatantly lying to the consumer.)
The update URLs set in the UserScript are only for ease of use but will mean that updates are sourced directly from the latest commit in this repo. If you do not trust the code here or want automatic updates, then disable script updates in your UserScript manager and/or remove the following lines from the script in your UserScript manager:
js // @updateURL https://raw.githubusercontent.com/Wilkolicious/twitchAdSkip/main/twitchAdSkip.js // @downloadURL https://raw.githubusercontent.com/Wilkolicious/twitchAdSkip/main/twitchAdSkip.js