TheRealJoelmatic / RemoveAdblockThing

The intrusive "Ad blocker are not allowed on YouTube" message is annoying. This open-source project aims to address this issue by providing a solution to bypass YouTube's ad blocker detection
http://joelmatic.com/
MIT License
6.07k stars 333 forks source link

Stopped working on Chrome as of today #118

Closed zapcity closed 10 months ago

zapcity commented 11 months ago

I've been using 'Remove Adblock Thing' in Chrome for a few days without issue. However, it's stopped working today. I briefly get the "adblockers violate YT ToS" dialog, then the screen is black. Resorted to using Brave for the time being.

cypher-me commented 11 months ago

Same here

madhavkhoslaa commented 11 months ago

Same on firefox :(

AymericKing commented 11 months ago

same

pizzatari commented 11 months ago

It's still working for me, but I made some minor modifications to the script. Mine working might be due to Youtube detecting the script by comparing a checksum or hash of the file. My copy would have a different checksum/hash. It's speculation, but I think it's a reasonable assumption, but it's also possible YT's detection code hasn't rolled out to all the CDNs yet.

zapcity commented 11 months ago

It's still working for me, but I made some minor modifications to the script. Mine working might be due to Youtube detecting the script by comparing a checksum or hash of the file. My copy would have a different checksum/hash. It's speculation, but I think it's a reasonable assumption, but it's also possible YT's detection code hasn't rolled out to all the CDNs yet.

Thanks for that! It's now working for me after making a slight modification to the code i.e. changing the name of a single variable. So very likely hash/checksum detection at play.

madhavkhoslaa commented 11 months ago

@zapcity @pizzatari What are the "slight changes" ? And why don't you put a PR ? ;_;

zapcity commented 11 months ago

@zapcity @pizzatari What are the "slight changes" ? And why don't you put a PR ? ;_;

Just change any variable name. Example, change the variable fullScreenButton on lines 84, 110 and 113 to fullScreenButtonX. This change will create a different hash code/checksum for the file, so it is different from the default.

pizzatari commented 11 months ago

@zapcity @pizzatari What are the "slight changes" ? And why don't you put a PR ? ;_;

I will show what I changed, but I'm not recommending it as a pull and commit. It was a quick and dirty change to remove a Javascript error and add a little bit of obfuscation when skipping to the end of the video.

Lines 144 to 151:

            if (ad)
            {
                let rnd = 5 + Math.floor(Math.random() * 10);

                const video = document.querySelector('video');
                video.playbackRate = 10;
                video.volume = 0;
                video.currentTime = isNaN(video.duration) ? rnd : video.duration;
                if (isNaN(video.duration)) console.log("video duration was not a number. setting to " + rnd);
                skipBtn?.click();
            }

I added a check for NaN (not a number) on video.duration and added a random duration between 5 and 15 seconds. video.duration seems to be NaN in my browser every time, so mine always falls back to random.

I was slightly concerned about the script always skipping to the end or beyond the end of the video, because it could be simple for Youtube to detect strange playback behavior. They could measure the true start and end times by the system clock and notice actual playback time is zero or rounds down to zero. Allowing the script to speed up the playback 10x and letting it play 0.5 to 3 seconds could add some obfuscation and cause any checks for zero playback time to fail.

This means that on my browser the video flashes for a bit, plays for 0.5 to 3 seconds and then disappears. I find that to be a totally acceptable experience. It also gives me visual feedback the script is working.