Coder Social home page Coder Social logo

0x48piraj / fadblock Goto Github PK

View Code? Open in Web Editor NEW
2.4K 16.0 109.0 1.02 MB

Friendly Adblock for YouTube: A fast, lightweight, and undetectable YouTube Ads Blocker for Chrome, Opera and Firefox.

Shell 1.29% JavaScript 30.15% CSS 55.20% HTML 13.37%
adblock adguard blocker chrome extension firefox javascript opera privacy youtube

fadblock's Introduction

Fadblock Origin: A fast, lightweight, and undetectable YouTube Ads Blocker for Chrome, Opera and Firefox
A fast, lightweight, and undetectable YouTube Ads Blocker for Chrome, Opera, and Firefox.

Get FadBlock Origin for Firefox Get FadBlock Origin for Chromium Get FadBlock Origin for Opera

FadBlock Origin: Friendly Youtube™ Adblock

This was posted over Reddit a few months ago, Apparently Ad Blockers are not allowed on Youtube. Is this a new thing they've implemented? and judging by all the recent comments and posts all over r/youtube, this change was just rolled out on a larger scale.

This blocker is designed to monitor advertisements, automatically seek the ads, and skip them. It's important to note that this doesn't classify as traditional ad blocking, as the ad content is technically "loaded".

Nevertheless, the extension's underlying logic enables it to fast-forward through the ad content to its conclusion. The entire process is optimized to occur within an extremely brief timeframe, typically <=100 milliseconds, ensuring a smooth and uninterrupted user experience.

MAJOR ANNOUNCEMENT 📣📣📣

I am no longer the owner of the extension called "FadBlock". I handed the extension off over a month ago, seems like it traded hands a couple of times, and now the current owner has added malicious code while keeping the extension as it is!

I am taking immediate action and will release a new version (under a new name called "FadBlock Origin") of the clean codebase for everyone to use.

I am also thinking of pursuing legal action as it appears they have retained the PayPal and other support links!

I have notified the few people who supported the extension and have sent them the new codebase locally, for the rest, the new version has been submitted to the web store and will hopefully be released in under 3-5 days.

As of now, I would also ask all of the current users to report that extension for abuse so the Chrome team is notified while I recover the situation.

-- RANT BELOW --

Why? Do all Chrome extensions that are traded end up being misused? It's heartbreaking.

I thought I took precautions to ensure the buyer wouldn't use it maliciously, but it appears there's a new owner in control, indicating that it exchanged hands again. I transferred the extension because I believed it could benefit all users. Maintenance had become challenging, and I envisioned FadBlock evolving into a robust full-blown ChatGPT-powered powerhouse, capable of generating transcripts, language translation, and more, with significant potential…

Faster, smoother, and better than ever!

The upcoming version will utilize a custom MutationObserver with polyfill to ensure compatibility with older browsers. This was the initial reason for not implementing MO from the start.

The next version will expand onto YouTube Music 🎉 and will have a "Blocked Ads" Counter while including other niche features as well as proposed bug fixes.

As this project has demanded a substantial amount of time, the repository will transition to an open-core model for ongoing maintenance and updates.

Note: Some people are getting confused about the new permissions as well as the access to extensionpay.com. The storage permission is for counting the "Blocked YouTube Ads" and ExtensionPay is a payment processor integrated with Stripe for obtaining a lifetime license after an initial free trial period (it's gonna stay free after as well but will ask for a contribution now and then).

I genuinely hope you all can appreciate the immense amount of time and effort it requires to sustain a project like this all the while YouTube keeps changing the rules, trying to shut out everything. All this coupled with working >80 hours/week on my own thing (not FadBlock Origin). If you're not satisfied with the decision where you have to pay a one-time contribution as a gesture for "job well done and keep at it", you still have the option to manually roll back to version 1.3. I won't remove it; it just won't receive further updates. I believe that's a fair compromise.

Coverage

Features

This extension effectively eliminates all categories of YouTube advertisements:

Category 1: Ads visible on the homepage.

Category 2: Ads overlaid atop the suggested video list.

Category 3: Ads displayed below the video description.

Starting on April 6th, 2023, the “Overlay ads” ad format will no longer appear on YouTube to help improve the viewer experience and shift engagement to higher-performing ad formats on desktop and mobile devices. Overlay ads are a legacy ad format that is only served on desktops and are disruptive for viewers.

Category 4: Skippable 5-second-must-be-watched video ads, which may be positioned at the video's start, midway, or at the end.

Category 5: Ads similar to Category 4, but with two consecutive video ads instead of one.

Category 6: Inescapable 10-second video ads, which must be watched.

FAQ

  1. It is not working!

You will have to disable other adblockers as they are getting detected. It's not due to FadBlock Origin as the technique it uses is completely different than other adblockers. It's hacky but it works and Google can't do jack (for the most part).

Some of the extensions that do not and do work with FadBlock Origin are listed down below,

Name of the extension Getting detected
uBlock Origin ✔️
Enhancer For Youtube ✔️
SponsorBlock for YouTube (probably)
Return YouTube Dislike
Malwarebytes extension ✔️
Brave in-built adblock ✔️
Firefox in-built adblock ✔️

You can also add youtube.com to the exception list for domains on other adblockers (uBlock Origin, AdBlock) and then download FadBlock Origin to override regular Adblock being prioritized on YouTube while the conventional adblocker will work across the remainder of the Internet.

Note: If you're still getting YouTube's Adblock warning, look at your extensions, and disable extensions one by one until you find your culprit. If you still can't find it, change your browser to Chrome (as it has no built-in adblocker) and test again. If it still doesn't work, then and only then create an issue.

  1. Why there's no privacy policy?

There’s no privacy policy as there’s no data collection at all, not even analytical data for error reporting. Everything happens locally. No remote connections are made, nada!

  1. How do I use it for my phone?

Unfortunately, there’s no app or anything. You cannot install Chrome extensions on the Chrome browser on Android, but several Chromium-based third-party browsers support extensions (e.g. Brave Browser).

Note: You will have to leave the YouTube app and watch over a browser (not very elegant, sorry)

Install FadBlock Origin to Opera, Edge, Brave and Safari

This section explains how to install the extension utilizing the developer mode as well as Chromium-based browsers,

installing chrome extension in dev mode

Opera & Edge

Go to the extensions manager page for Opera (opera://extensions) or Edge (edge://extensions), turn on developer mode, and click on Load Unpacked.

Brave Browser

You can visit the Chrome Web Store and download the extension.

Install on Safari @ macOS

  1. Download the Userscripts from the App Store

  2. To open Userscripts and enable Safari extensions settings, open Userscripts (userscriptsurlscheme://), then select the checkbox next to Userscripts.

  3. Click on the Userscripts icon at the top of Safari to open the script editor and create a new JS file. Then, copy the code from fadblock.user.js and paste it into the newly created JS file.

Show your support

  • Think about making a tiny one-time contribution to keep enjoying FadBlock Origin with extended support.
  • Star (⭐) this repository and consider following me on GitHub if you're using the free version.

Disclaimer

This software is provided for educational purposes only and is provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non-infringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

fadblock's People

Contributors

0x48piraj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fadblock's Issues

Youtube ads are playing at 1x speed and without video

Installed fadblock and was working as expected for ~ 1 week - Youtube ads would load, and then be promptly skipped. Logged in today and found that youtube ads are loading and playing at 1x speed, and without video - only sound.
Screenshot 2023-10-25 at 12 07 24 PM

Does not "skip" first ad

Found an issue that quite a few ads for me at the start of the video are still played for around 10s. The ads themselves are not shown, just the loading animation. Not sure if this is intentional?

FadBlock doesn't work when I'm logged in Youtube

I disabled all adblock plugins and only left FadBlock active while logged in youtube using Chrome, but youtube still blocked videos and said adblock is detected. I switched to incognito mode and only kept FadBlock on (without logging in) and this time it worked.

List of conflicting and non-conflicting extensions/plugins

I have several extensions (Firefox) for YouTube and I had issues with playing videos because of them conflicting with Fadblock. Is it possible to gather list so the users will know which plugins they should avoid?
For example:

Conflicting:
uBlock Origin (if youtube is not whitelisted)
Enhancer For Youtube

Non-conflicting:
no-more-rounded-corners
Return YouTube Dislike
SponsorBlock for YouTube

Open Core Debate

Firefox asked me to accept new permissions and extensionpay.com was listed as one of the new domains needing permissions. Care to explain?

Youtube recognises it as adblock

I've disabled my original adblocker, but every time I click on a video, youtube is blocked with the typical "adblockers violate youtube's terms and service" page. I reloaded the browser, even completely restarted the browser, and still the same. Is there something else I need to do?? This is extremely frustrating

Skipped the actual video

I am using Opera. Sometimes, when skipping the ad, it also skips a part of the actual video. For instance, if the ad is 1:30 minutes long, it may also skip the video for 1:30 minutes. Additionally, sometimes it does not skip the ad.

V2.0 not skipping ads

Updated today to 2.0 but it don't works, i tryed it too on a fresh Firefox install with no other addons, installed and uninstalled the addoin, restarted the browser sometimes, but no changes. I don't know but the v1.3 was the last good working one, since i always messed up with the newer versions :(

Here is a screenshot, and a -i hope usefull- DOM state:

fadblok

outerhtml.txt

Thank you for your work so far

Random refresh of all YouTube pages & 100% CPU load

All YouTube videos suddenly refreshed (progress/state lost) and CPU went to 100% for some time as a result.
I presume this was due to the extension updating. It happened once when the extension was installed and today was the second time it happened.

This is undesirable behavior.

"Show transcript" does not work

Describe the bug
"Show transcript" does not work when FadBlock is installed and enabled. If you disable FadBlock, "Show transcript" does work.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any YouTube video with transcripts
  2. Click on "Show transcript"
  3. The transcript panel not appear.

Expected behavior
After clicking on "Show transcript", the transcript shows.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome, Firefox
  • Version: Latest

Ads are still running

Describe the bug
The Ads are still running, but the screen is blacked out. Audio for the ads is still playing.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Microsoft Edge

Doesn't mute the first ad

videoPlayer.muted = true; does not work for the first ad (works for the second ad that follows). I believe it's because this code really starts working after 100 ms.

I'm not sure if there is a workaround to this. But could you please look into this? Thanks.

Can't open the chapter list

Describe the bug
If you try clicking on a chapter name, the list doesn't appear.

To Reproduce
Steps to reproduce the behavior:

  1. Enable the extension
  2. Click on the chapter name (the one with arrow next to it)
  3. nothing happens
  4. See error

Expected behavior
The chapter list is supposed to open

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Firefox
  • Version: 1,3

Additional context
The one under the video progress bar thing, that would say "View Chapter"

Potentially Does Not Skip Surveys

I'm not sure if this is unaccounted for in the content script (either unintentionally or by design) or was simply a one-off fluke but v1.1 appears to not skip user surveys prompted by Youtube. The survey in question did have a skip button. I didn't have time to check the HTML source for any new class names but will keep an eye out for the next one if it happens again.

Edit: Ok I finally caught another survey. It looks like const skipLock is returning False because .ytp-ad-preview-text is not loaded during the survey. It does load the class .ytp-ad-survey though and still has the same .ytp-ad-skip-button class so perhaps including the survey class as an OR operand for skipLock will fix it. I am adding it to my local branch and will see how it goes.

not working in tandem with Enhancer for YouTube extension

When Enhancer for YouTube is active, the nagging screen appears, when Enhancer for YouTube is disabled, the nagging screen does not appear. Reproduced only on 1 system, needs others.

Not sure if this should be fixed here, or at Enhancer for YouTube, or even if you want to fix this, and start a never ending compatibility chase, but Enhancer for YouTube is used by a million users. So it's up to you if you want to say "fuck off".

Thanks for your work.

Ads Not Skiped

Yesterday the ads were skipping fine, but thing were unable to autoplay and the "pop out" feature on Firefox videos was not working. With today's update it seems like the pop out feature is back and videos can auto play but ads are not skipping.

10-31 YT ADS

Questionable access to expensionpay.com

The addon is now making unnecessary access requests to extensionpay.com, I've disabled addon until removed, there's no expalantion why this is there all of a sudden and extremely worrying

(suggestion) mute ads

Thank you for this amazing extension, it made me realize how much I take adblock for granted. Really small nitpick is I'll be playing some music and between songs i'll sometimes hear a tenth of a second of an ad before it skips it. Would appreciate if ads could be muted to remove the small disturbance.

Prototype pollution

This plugin uses technique called "prototype pollution" which is considered anti-pattern and may cause forward compatibility issues in the future if similar methods would be added by the language itself:

Document.prototype.hideElementsBySelector = (selector) =>
[...document.querySelectorAll(selector)].forEach(
(el) => (el.style.display = "none")
);

There is no real reason to do that really you can just define your own function and call it directly instead of adding it to global document object.

Transcript Not Working with Extension Enabled

The extension skips through ads just fine, but it unfortunately also prevents video transcripts from loading when enabled. I've tested to make sure, and when the extension is off I can pull up the transcript, but when the extension is on clicking the transcript button does nothing. This extension is wonderful and the issue's not that big of a deal, but if it could be fixed it would be perfect! Thanks!

**I've tried it in Firefox Developer Edition and Google Chrome, and the issue is the same on both

Ads are not skipped

Google Chrome: Version 118.0.5993.118 (Official Build) (64-bit)
Windows 10 Home, 64-bit operating system, x64-based processor

I tried logging out of my google account and the problem disappeared. It appeared again when I switch back to the main account.

111未命名

Only Category 1: Ads visible on the home page have been eliminated

Video pages not loading

Describe the bug
When trying to watch a video, the page itself wont load. It will take sometime, it can be seconds or a couple minutes. Once it loads, the video plays fine and everything seems normal, even the adblock works as intended.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Youtube
  2. Click on any video
  3. See error

Expected behavior
The video page loads instantly.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome
  • Version: 118.0.5993.118 (64bits)

Additional context
I tried uninstalling the adblock and it fixes the problem (after a few minutes aswell, maybe something related to cache?), so I'm assuming its related to the adblock itself.

FadBlock does not work anymore

I have been using it for the past few days now. Just today, it has stopped working. I tried the newer version 1.3 but it no longer forwards through any ads.

This does not work

I have the addon installed on Opera LVL5 (core: 102.0.4880.90) and I still get the Youtube error

Not-very-maintainable™ codebase

This extension has the exact same implementation for all three different browsers currently: chrome, firefox and opera.

This is of course fine for the beginning but as you will try to maintain this project it will become harder and harder to do so and keep track of changes in all 3 implementations. Also if time will come for another implementation it will add even greater complexity for maintenance.

I would suggest extracting the main extension logic into a reusable code which does not depend on any specific browser extension APIs and then linking it in specific extensions.

If you like I would gladly help you with refactoring as this change most likely will have to introduce a proper build step using something like rollup or vite (not sh/bash).

works but

im having a issue where i can tell that the blocker is working because i see ads flash for a fraction of a second, but i have to refresh once or twice before the popup telling me to disable my blocker goes away and lets me play the video, i have adblock allowing ads on YT

Cannot figure out how to purchase license

Raj, my friend, I appreciate everything you do and would love to purchase a license for your superior adblock solution--one that allows me to enjoy YouTube without depriving my favorite creators of ad revenue. It's truly a win-win. I honestly don't even miss uBlock Origin (on YouTube, at least) and won't be going back to it for YouTube.

But I cannot for the life of me figure out how I'm meant to purchase a license for Fadblock. I see the popup about the trial period ending, and as far as I can tell from your release notes, the extension itself is supposed to interact with extensionpay for the sake of the license in question, but there appears to be no link, no nothing, to that end. GitHub offers ways to sponsor you, as does your homepage, but none of these indicate any kind of license purchase for Fadblock.

Please just let me know what I should do.

Lag

When playing YouTube videos continuously like using a playlist, sometimes the loading speed cannot keep up with the playback speed, and the only fix is to open a new tab to watch it.
I'm sure FadBlock is the problem because it was perfectly fine before using this extension

UPDATE

After the 26-10-2023 update, the extension stopped working

BlackScreen

IDK if it is just my browser (Brave) but sometimes i get a black screen. Not sure could cause this to happen in the extension.

improve performance and disable reflash after installed

Run the script every 0.1 second something may cause lagging on my old PC.

For better performance, I changed the setTimeout to MutationObserver. It can reduce a lot of the number of runs. Should i make a pull request?
image

Also, I would like to disable reflashing all the YouTube tabs after installed. Because all the YouTube videos will play at the same time after reflash. it's so annoying when I have multiple YouTube tabs.

Uncaught TypeError: Cannot read properties of undefined (reading 'onUpdated')

chrome.tabs is not available in a content script by design. Content scripts can access only 4 chrome API so chrome.tabs is only available in a background/popup or other internal extension page that has chrome-extension://<extension-id>/ URL.

Content script can only use chrome.i18n, chrome.dom, chrome.storage, and a subset of chrome.runtime/chrome.extension.

Most chrome APIs such as chrome.tabs are only available the background script (service worker in MV3), popup script, etc.

Solution

Pass a message from the content script to the background script and use the API there.

YouTube endless refresh.

When I try to watch the video, YouTube starts endlessly refreshing the page. I'm not using any other ad blockers, but I have that issue in the past (while using ad blockers)

Does not work on MacOS

Describe the bug
Does not stop any ads playing during videos (beginning, duo, middle of vid etc) on MacOS 12.2 on Chrome (Version 118.0.5993.117)

All other adblockers are stopped (Adblock)

Open video in new Tab cause no video but black screen

Platform: Firefox / Linux.

Reproduce: open a new video with new tab will cause it no loading but black screen on the new tab
Reload the new tab doesn't help.

(click on video directly without opening it in new tab works fine)

Speed up the YouTube Music ads

I hope to speed up the ads on YouTube Music. Currently, when I listen music on YouTube Music, the ads still play in full, and ad blockers consider youtube.com and music.youtube.com as the same domain, so they can only be enabled or disabled at the same time.

Seeking causes audio delay

When seeking video on Youtube there's a noticable audio delay now. The video starts playing instantly, but the audio takes a second or two to start.

Firefox, latest version 118.0.2 Win 11.

Disruptive UX on updates

I've noticed that this extension will try to reload any YT tab whenever it gets updated in the background or even when browser itself get's updated which makes no sense and is quite disruptive for a UX:

chrome.tabs.query({}, (tabs) => {
tabs
.filter((tab) => tab.url.startsWith("https://www.youtube.com/"))
.forEach(({ id }) => {
chrome.tabs.reload(id);
});
});

Can you consider removing this option, and just auto reloading on install as this is the only time when reloading is acceptable-ish, even tho I would argue that is also not desirable in some cases, like you would like to note a timestamp of a video you are watching before reload (yes if your YT history is off it will not even remember your last played time geez).

Maybe this option can also be configurable from the extension management so users can opt-in for auto-update as it is right now but that is not that critical I think, the most important is to remove disruptive behavior first I think.

Thanks for the extension btw!

Lag

Its not really a bug but every since I got this extension my YouTube videos have been lagging out more and started lagging during videos which rarely happens with this computer YouTube.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.