Build Your First AdBlocker - Chrome Extension

Поділитися
Вставка
  • Опубліковано 12 вер 2024
  • What is an Ad Blocker?
    An ad blocker is a piece of software that blocks network requests to and/or from advertising servers.
    ⭐ Github Code
    github.com/pke...
    📕 Expand your JavaScript knowledge by downloading my latest e-books!
    payhip.com/Dev...
    🤖 Join me on Discord
    / discord
    👕 DevSage Merchandise
    cottonbureau.c...

КОМЕНТАРІ • 182

  • @DevSage
    @DevSage  3 роки тому +22

    Whoops, looks like I goofed at the very end with the defaultFilters. defaultFilters should be moved to the top of the file. And it should also be initialized with "const" (const defaultFilters = ...) The code should be correct in the Github repo!

    • @guimguinleo
      @guimguinleo 2 роки тому +5

      It does not work, Google says that I CANNOT USE Manifest V2, only V3. I tried to use every method that I could find, and it did not work!

    • @0necentoff
      @0necentoff 6 місяців тому

      just change to V3

  • @RAMANKUMARGCEBIT
    @RAMANKUMARGCEBIT Рік тому +4

    very helpful. deeply grateful for making such a simple to understand video.

  • @tonyg_nerd
    @tonyg_nerd Рік тому +1

    A functional Chrome extension with demo in 13 minutes. Kewl. Thanks

  • @Geomaverick124
    @Geomaverick124 4 роки тому +3

    Hey Bro! Codingphase sent me here. Keep up the good work!

    • @DevSage
      @DevSage  4 роки тому

      I appreciate that man!

  • @jasonstatham2422
    @jasonstatham2422 3 роки тому +7

    Hey I want to know the name of the tune that you have played in the beginning 😂

    • @DevSage
      @DevSage  3 роки тому +1

      Something I made with Mixcraft

  • @carlosalfredo657
    @carlosalfredo657 4 роки тому +2

    Nice video man! Your first chrome extension, easy and deadly simple! The only observation I have is that is a little slow, I tried watching the video at 1.25x speed and then 1.5x speed and it's better. Nice voice too.

  • @ne9835
    @ne9835 4 роки тому +6

    Hey man CodingPhase sends me here, you can code man keep doing your thing!

    • @DevSage
      @DevSage  4 роки тому +1

      Appreciate ya

    • @ne9835
      @ne9835 4 роки тому +2

      @@DevSage Yeah man👌

  • @emeraldthunder
    @emeraldthunder 3 роки тому +4

    Thank you for this. It is a practical thing to make while learning.

    • @DevSage
      @DevSage  3 роки тому +1

      Glad it was helpful!

  • @georgilos9899
    @georgilos9899 Рік тому +2

    Any idea why google extentions fail to upload the backgroud script (Could not load background script 'background.js'.
    Could not load manifest.)

    • @1985altan
      @1985altan Рік тому

      mine says "background.ks" even the file name extension is "js"

    • @georgilos9899
      @georgilos9899 Рік тому

      @@1985altan is it recognized as a JavaScript file in your editor ?

  • @trap_time
    @trap_time 2 місяці тому

    HOLL UP ON THAT INTRO 🔥

  • @stipriausias
    @stipriausias Рік тому

    Holly shit. I was always thinking that add blockers are really complex things. But no it is quite simple. Thank you man for a nice video.

  • @Eduardo-fx9ih
    @Eduardo-fx9ih 2 роки тому +1

    very good!!!! this is just an amazing startup for a custom and powerfull extension! great!

    • @DevSage
      @DevSage  2 роки тому +1

      Glad it helped Eduardo!

  • @anzaralim3616
    @anzaralim3616 4 роки тому +1

    All those AD networks want your location 😂

  • @ayushdwivedi3769
    @ayushdwivedi3769 4 роки тому +1

    awesome man...loved it...liked and subscribed...keepup the good work

    • @DevSage
      @DevSage  4 роки тому

      Thank you, and welcome!

  • @kartheek6495
    @kartheek6495 2 роки тому +2

    Thank you so much for explaining how it works and how to do it practically. could you please also explain, what the use of manifest version is and how to use manifest version 3?

  • @dadebarlow1883
    @dadebarlow1883 4 роки тому +5

    Wow. Thank you for this video. Can you give an example of how this could be done using a RegEx? For instance, block pages whose request contains a certain pattern. I'm thinking of XSS, specifically.

  • @emeraldthunder
    @emeraldthunder 3 роки тому +1

    Thank you this is really helping me write browser extensions.

  • @sticktock2448
    @sticktock2448 11 місяців тому +6

    Here after my encounter with UA-cam's anti adblocker campaign.

    • @davidsupolik1860
      @davidsupolik1860 9 місяців тому

      i have like 1000 rows of ad sites if you want.

    • @sticktock2448
      @sticktock2448 9 місяців тому

      @@davidsupolik1860 Thanks for the offer, not too long after viewing this video, I started experimenting with some things. I’ve found that refreshing the page several times while in the compatibility mode in the inspection viewer window will allow you to bypass ads. If the Adblocker I am using hasn’t already been updated and it’s just confirmation bias.

  • @heuheuheh
    @heuheuheh 4 роки тому +5

    Hey man, thanks for the video. I would like to build an extension that removes certain elements from a specific site, for example, an extension that removes the progress bar on UA-cam (it can be easily removed by inspecting the page, but the point is that the extension would do it for you without you needing to do it all the time). Can you recommend me a good learning resource?

    • @DevSage
      @DevSage  4 роки тому +3

      I would probably look through the code for some of these sample Chrome extensions to get more familiar
      developer.chrome.com/extensions/samples
      And also
      developer.chrome.com/extensions/getstarted

    • @heuheuheh
      @heuheuheh 4 роки тому +1

      @@DevSage Will check it out, thanks again! Cheers!

  • @ruaidhrimulgrew6568
    @ruaidhrimulgrew6568 3 роки тому +1

    Amazing tutorial all round

  • @haopeiyang3443
    @haopeiyang3443 4 роки тому +4

    Great video. Something I've always wanted to learn is how to start building a framework like VueJS. Maybe you can show us!

    • @DevSage
      @DevSage  4 роки тому

      That's interesting! I'll look into it.

  • @akalabayapal9634
    @akalabayapal9634 4 роки тому +2

    Thanks very much Sir. .
    this will help me to complete my antivirus project

  • @tjb3171
    @tjb3171 28 днів тому

    awesome!! thanks

  • @jacobweaver8505
    @jacobweaver8505 4 роки тому +1

    where could I find a list of more filters and do the filters have to be a URL or can they be things that block in-page pop-ups ("subscribe to this newsletter") type stuff?

  • @thegamerdevil6883
    @thegamerdevil6883 3 роки тому +2

    Does this adblocker word with youtube? Also, can you make a Part 2 showing how to make it undetected?

  • @hericklenin
    @hericklenin 4 роки тому +1

    Thanks for this, it helps a lot!

  • @veerbal1
    @veerbal1 3 роки тому +1

    Really useful content, thank you

  • @FlySoloG
    @FlySoloG 4 роки тому +2

    love it!

  • @nataliapalweski2072
    @nataliapalweski2072 4 роки тому +1

    can you please make video playlist for only making chrome extension beginner to advance.
    because right now in this extension we don't have any options to add custom url's etc

  • @Kevin-te7rr
    @Kevin-te7rr 4 роки тому +2

    Hey bro, CodingPhase sent me here, can you walk us through on how you build your portfolio
    subscribed : )

  • @myithspa25
    @myithspa25 6 місяців тому

    Something on UA-cam has updated and it's not blocking ads. It doesn't block the video, but if I click the thing to go to their website, *then* it blocks.

  • @chrisder1814
    @chrisder1814 Місяць тому

    hello I had an idea for a chrome extension and I would like you to tell me what you think of it

  • @fancyspirits3424
    @fancyspirits3424 4 роки тому +1

    Thanks it really worked

  • @guimguinleo
    @guimguinleo 2 роки тому +3

    It does not work, Google says that I CANNOT USE Manifest V2, only V3. I tried to use every method that I could find, and it did not work!

  • @andymarkov8081
    @andymarkov8081 3 роки тому +2

    I get two errors.
    This is the first one --- "Uncaught ReferenceError: defaultFilters is not defined"
    And this is the second one --- "Uncaught ReferenceError: Cannot access 'defaultFilters' before initialization"

    • @DevSage
      @DevSage  3 роки тому

      Look at the pinned comment

  • @escapefelicity2913
    @escapefelicity2913 10 місяців тому

    well done

  • @dmoney_thegreat
    @dmoney_thegreat 2 роки тому +2

    would you be able to do a video using manifest 3?

    • @DevSage
      @DevSage  2 роки тому +1

      I'll definitely consider it

  • @sarthakrana3703
    @sarthakrana3703 2 роки тому +2

    BUT HOW TO MAKE UA-cam VIDEO AD
    BLOCKER ?

  • @anuramkalyan875
    @anuramkalyan875 3 роки тому +1

    Thanks!

  • @amuga_1
    @amuga_1 7 місяців тому

    blocking the money thirsty advertisers yes! I love it !

  • @JeffPittman
    @JeffPittman 3 роки тому +2

    Awesome

  • @adriansrfr
    @adriansrfr Рік тому

    Ty!

  • @powerebyAI
    @powerebyAI Рік тому

    hi this software cannot block youtube ads. how can I make him prevent this?

  • @prestonjudearnold2814
    @prestonjudearnold2814 4 роки тому +1

    thank you

  • @fu2201
    @fu2201 2 роки тому

    Failed to load extension
    File
    ~\Desktop\AdBlocker
    Error
    Could not load background script 'background.json'.
    Could not load manifest.

    • @Jacob13044
      @Jacob13044 2 роки тому

      it should be manifest.json and background.js not background.json

  • @adityavaste3732
    @adityavaste3732 2 роки тому +1

    great video..

  • @mtaskomur
    @mtaskomur Рік тому

    it worked thanks. but I couldn't block the ads coming in between youtube videos. what is the way to it?

  • @es_stinkt_puhfelix6293
    @es_stinkt_puhfelix6293 2 роки тому +1

    amazing tutorial. 6 stars out of 5 i swear

  • @auroraiiit5765
    @auroraiiit5765 4 роки тому +1

    @DevSage how can we check the functionality of any existing chrome extension.. i.e. what is a way to get an idea of code for an existing extension?

    • @DevSage
      @DevSage  4 роки тому

      I would start here gist.github.com/paulirish/78d6c1406c901be02c2d

  • @akashreddyjammula
    @akashreddyjammula 11 місяців тому

    Will this works with blocking youtube adds.

  • @RetroEcoChicken
    @RetroEcoChicken Рік тому

    the spaces in manifest are very important

  • @hemangchaudhary4700
    @hemangchaudhary4700 3 роки тому +1

    Hey DevSage! So Can I Just show and build this one for my channel? WIthout all your logos and I'll change some of the code too.. By The way this is NON MONETIZATION

  • @inspectorlunge3887
    @inspectorlunge3887 4 роки тому +1

    @DevSage Do you know if this could all be coded in notepad, or would I need an API/sdk?

    • @DevSage
      @DevSage  4 роки тому

      You can code it in notepad. At the end of the day it can be coded in any text editor. You'll just take the plugin folder and upload it to Google Chrome

    • @inspectorlunge3887
      @inspectorlunge3887 4 роки тому

      DevSage Okay, that's a relief, thanks. I'm stuck coding on notepad in windows 98 at the moment, because of a broken ac adapter for a newer machine. If I take the win98 machine to the public library though I could transfer this to my Android phone with their computers.

  • @PixelPaperDesigns
    @PixelPaperDesigns 4 роки тому

    Where do we get the logos from? Do we have to download images with those specific sizes? Or download images and resize them? I tried resizing the images I downloaded by pixel size and they are very tiny. I need help

  • @PixelPaperDesigns
    @PixelPaperDesigns 4 роки тому

    I don't even see ad-blocker folder on my PC at all. Not sure if I need to download an ad-blocker....
    Even after downloading ad-blocker, the app is not showing up on my PC.

  • @PTS8
    @PTS8 Рік тому

    im getting error on manifest where we did it 2

  • @shyama5612
    @shyama5612 10 місяців тому

    Great intro. Does this work in 2023?

  • @astronaut736
    @astronaut736 3 роки тому +2

    bro, I tried your video tutorial but it does not work on youtube it not blocking ads on youtube so please tell me how to enable the blocking feature in youtube.

    • @DevSage
      @DevSage  3 роки тому

      Not sure

    • @astronaut736
      @astronaut736 3 роки тому

      @@DevSage ok bro but please check that and tell me

    • @DevSage
      @DevSage  3 роки тому

      @@astronaut736 I think you could figure it out if you did your own research

    • @astronaut736
      @astronaut736 3 роки тому

      ​@@DevSage ok bro, I will try to thank you very much for your tutorial it will work on other websites except youtube.

  • @programmingholic
    @programmingholic Рік тому

    Thanks so much ,

  • @viridiantelamon
    @viridiantelamon 2 роки тому

    I know this video is a bit old, but is there a way to make this compatible with Fire Fox? Thank you in advance. Also, great video.

  • @user-ez6dn5do9p
    @user-ez6dn5do9p 5 місяців тому +1

    Hey man, could you create a chrome extension to automatically save liked facebook videos?

    • @DevSage
      @DevSage  3 місяці тому

      As in, is it possible? Yeah I don't see why not,

    • @user-ez6dn5do9p
      @user-ez6dn5do9p 3 місяці тому

      @@DevSage As in i tried building it but failed

  • @vntconcept
    @vntconcept 2 роки тому

    how to build adblock for wordpress plugin to stop redirect page?

    • @DevSage
      @DevSage  2 роки тому

      I have no idea

  • @ambujsahu8162
    @ambujsahu8162 Рік тому

    nice video

  • @escapefelicity2913
    @escapefelicity2913 10 місяців тому

    I need an extension to stop mouseovers

  • @hrishikssh
    @hrishikssh 2 роки тому

    brother , the extension is not blocking the pages i want it to .. can u tell me a solution

  • @arunshukla5664
    @arunshukla5664 11 місяців тому

    Does this work in 2023 with the new YT annoying popup?

  • @jerin_stephen
    @jerin_stephen 4 роки тому +1

    how to do it for fire fox

  • @izharahmed7463
    @izharahmed7463 8 місяців тому

    can i block youtube ads

  • @hanjelly5410
    @hanjelly5410 3 роки тому +2

    great video! Q: which extension in your VSCode do you have to give these coding hints for the chrome extension dev coding? eg: how your VSCode know the "chrome" and "addEventListner()" functions?

  • @funwithalbi4504
    @funwithalbi4504 3 роки тому +2

    it says: Could not load background script 'background.js'.
    Could not load manifest.
    later: It works thanks!

    • @SB-ns4nw
      @SB-ns4nw 3 роки тому

      same here... how you fixed?

    • @SB-ns4nw
      @SB-ns4nw 3 роки тому

      got it.. place background.js into the main Folder. i created it into icons folder

  • @mamedulislam2629
    @mamedulislam2629 2 роки тому +1

    Great

  • @joe-zn4hb
    @joe-zn4hb 3 роки тому

    i did exactly what he did yet i am getting pop ups with errors when i try to load it as an extension, it says, "Required value 'version' is missing or invalid. It must be between 1-4 dot-separated integers each between 0 and 65536.
    Could not load manifest." However, my version and manifest_version are both correct to the video and correct to what the pop-up says, can anyone help me out here?

  • @ishaantek
    @ishaantek 4 роки тому

    Hi there. thank you so much for the video. Can you tell me how to block more than one website? Thank you!

  • @samuelyarasani3556
    @samuelyarasani3556 2 роки тому +1

    Great vid, but the thumbnail looks a lot like fiership's

    • @DevSage
      @DevSage  2 роки тому

      Thanks. The thumbnail is inspired by Fireship

  • @jashimkhan3159
    @jashimkhan3159 4 роки тому +1

    Awesome Tutorial!!!
    Subscribed..........

  • @xiaolong9446
    @xiaolong9446 3 роки тому +1

    Amazin!!!

  • @drool3616
    @drool3616 3 роки тому

    great video dude but i have a problem: Manifest is not valid JSON. Line: 1, column: 1, Unexpected token.
    this showed up when i loaded the adblocker and i'm just wondering where i went wrong

  • @jorginh_o
    @jorginh_o 4 роки тому +1

    @DevSage I like the tutorial. Very noob friendly. :)
    Is there any way to make it so background.js will upload as I get an error. :(

    • @jorginh_o
      @jorginh_o 4 роки тому

      | It won't even show the manifest.json file when I try to upload. :|

    • @DevSage
      @DevSage  4 роки тому

      Are you using the code in the repo?

    • @jorginh_o
      @jorginh_o 4 роки тому

      @@DevSage Yeah..

  • @vietnguyenc6612
    @vietnguyenc6612 4 роки тому +1

    Are you Kyle?

  • @adityavaste3732
    @adityavaste3732 2 роки тому

    How do I get a list of filter keywords?
    Does anyone know? Please suggest.

  • @nguyencaotai412
    @nguyencaotai412 4 роки тому

    You can block ads to google?

  • @jackleslie5612
    @jackleslie5612 2 роки тому

    why does it not work for me

  • @himanshikataria1231
    @himanshikataria1231 4 роки тому +3

    Hey! What other IDE can be used other than Visual Studio?

    • @DevSage
      @DevSage  4 роки тому +2

      Atom, Sublime Text, Visual Studio Code, Notepad++

    • @matzekatze8422
      @matzekatze8422 3 роки тому

      use Kile. and btw VSC isnt an IDE

    • @jeelpatel5791
      @jeelpatel5791 3 роки тому

      Brackets & Vim(this one is difficult as well as old style)

  • @winniepooh2533
    @winniepooh2533 3 роки тому

    Could not load icon 'icons/logo_16x16.png' specified in 'icons'.
    Could not load manifest.

    • @winniepooh2533
      @winniepooh2533 3 роки тому

      I can't post it in Chrome Extensions....Please help me.....

  • @garrettmcguire5454
    @garrettmcguire5454 3 роки тому

    When on chrome extensions, i load unpacked, then select my ad-blocker folder it gives me this error. "Manifest is not valid JSON. Line: 1, column: 1, Unexpected token." My code is identical to yours. any idea"s?

  • @user-pq1zz7lm2e
    @user-pq1zz7lm2e 3 місяці тому

    Not aggressive comment im just newbe ㅠㅠ this look like website blocker am i got it right?

    • @DevSage
      @DevSage  3 місяці тому

      It's a network request blocker.

  • @bu1491
    @bu1491 4 роки тому +1

    Bro I want to build an extension. I have no programming experience just a dope idea. Please help me.

    • @DevSage
      @DevSage  4 роки тому

      What's your idea?

    • @bu1491
      @bu1491 4 роки тому +1

      @@DevSage I want to build an extension that will allow me to "book" "buy" or "bid off a UA-cam video. For example, It would allow me to buy your course straight from your video. Or buy/bid on a DIY item from a content creator.
      It's a marketplace extension.
      Can we collab?

    • @bu1491
      @bu1491 4 роки тому +1

      @@DevSage is this not possible?

    • @DevSage
      @DevSage  4 роки тому

      @@bu1491 Sorry for late reply! I think that it's technically 'possible' but not very probable. Don't get me wrong, at first read I thought "wow this sounds like a pretty neat idea" but then I started thinking of use cases. Who is the target audience? Is it the people who want to sell their products via the extension? or is the target audience people who are looking to buy? If it's the first, then you would have a whole lot of sellers and little buyers. If it's the second, I don't know if people are so eager to spend money that they would download an extension to do so (maybe they would be). Then I thought about how buyers and sellers would actually even communicate with each other. A buyer extension would have to 'be aware of' the fact that there is something available to buy on this page. And I suppose that could be possible, with some database work. But there are so many other questions out there.

  • @ItzPikachoo
    @ItzPikachoo Рік тому

    Simple i agree but it's not working as a blocker

  • @ThunderStormFortnite
    @ThunderStormFortnite 4 роки тому +1

    Uncaught SyntaxError: missing ) after argument list
    Context
    _generated_background_page.html
    Stack Trace
    background.js:19 (anonymous function)

    • @DevSage
      @DevSage  4 роки тому

      Looks like you have a syntax error in background.js

  • @mihirsavla3233
    @mihirsavla3233 2 роки тому +1

    Ironic how you poasted how to to block ads on youtube and other websites on "youtube"
    not sure why youtube would allow this but thanks for the vider

  • @crysosancher
    @crysosancher 2 роки тому

    Not working

  • @blecomp
    @blecomp 4 роки тому +1

    Hello friend, first, great video, thanks for sharing. But where can I find the references of chrome object? thanks again cheers

    • @DevSage
      @DevSage  4 роки тому

      developer.chrome.com/extensions/devguide

  • @avi12
    @avi12 3 роки тому

    Sadly this video is only relevant to Manifest v2
    Manifest v3's network blocking works a little differently

  • @illusio6504
    @illusio6504 3 роки тому

    it block youtube ads

  • @pavansanthosh8085
    @pavansanthosh8085 4 роки тому +1

    That's great, as a junior Web developer can you suggest me some projects

    • @Ndzzle
      @Ndzzle 4 роки тому

      What are you trying to accomplish? Looking for a web dev career and need project ideas for your portfolio? The best advise for that situation is to build real world projects. By that I mean building a restaurant website, a realtor (houses) website, ecommerce, ext. Then buy domains for them and host them live. Add these sites to your resume as client work. Now you have real world experience. Just gotta think outside the box to get ahead!

  • @SaltyLasagna
    @SaltyLasagna 3 роки тому

    where do i research add websites?

    • @DevSage
      @DevSage  3 роки тому

      That's for you to find out

    • @SaltyLasagna
      @SaltyLasagna 3 роки тому

      @@DevSage why is there a period before teh websites but some dont

    • @DevSage
      @DevSage  3 роки тому

      It has something to do with regular expressions

  • @DKNworld
    @DKNworld 2 роки тому

    is not ad block but only webpage blocker OMG

  • @subhadipsur7561
    @subhadipsur7561 3 роки тому +1

    Like WhiteHat Hackers. Love it.

  • @devcode9290
    @devcode9290 3 роки тому

    Thanks a lot for the video! Like & Subscribe )

  • @domaincontroller
    @domaincontroller 3 роки тому

    01:42 manifest.json