Build Your First AdBlocker - Chrome Extension

  Рет қаралды 70,644

DevSage

DevSage

4 жыл бұрын

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/pkellz/devsage/tre...
📕 Expand your JavaScript knowledge by downloading my latest e-books!
payhip.com/DevSage
🤖 Join me on Discord
/ discord
👕 DevSage Merchandise
cottonbureau.com/people/devsage

Пікірлер: 181
@DevSage
@DevSage 2 жыл бұрын
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 жыл бұрын
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 3 ай бұрын
just change to V3
@RAMANKUMARGCEBIT
@RAMANKUMARGCEBIT Жыл бұрын
very helpful. deeply grateful for making such a simple to understand video.
@emeraldthunder
@emeraldthunder 3 жыл бұрын
Thank you for this. It is a practical thing to make while learning.
@DevSage
@DevSage 3 жыл бұрын
Glad it was helpful!
@carlosalfredo657
@carlosalfredo657 4 жыл бұрын
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.
@hericklenin
@hericklenin 4 жыл бұрын
Thanks for this, it helps a lot!
@Eduardo-fx9ih
@Eduardo-fx9ih 2 жыл бұрын
very good!!!! this is just an amazing startup for a custom and powerfull extension! great!
@DevSage
@DevSage 2 жыл бұрын
Glad it helped Eduardo!
@Geomaverick124
@Geomaverick124 4 жыл бұрын
Hey Bro! Codingphase sent me here. Keep up the good work!
@DevSage
@DevSage 4 жыл бұрын
I appreciate that man!
@ayushdwivedi3769
@ayushdwivedi3769 4 жыл бұрын
awesome man...loved it...liked and subscribed...keepup the good work
@DevSage
@DevSage 4 жыл бұрын
Thank you, and welcome!
@emeraldthunder
@emeraldthunder 3 жыл бұрын
Thank you this is really helping me write browser extensions.
@DevSage
@DevSage 3 жыл бұрын
No problem
@veerbal1
@veerbal1 3 жыл бұрын
Really useful content, thank you
@tonyg_nerd
@tonyg_nerd Жыл бұрын
A functional Chrome extension with demo in 13 minutes. Kewl. Thanks
@trap_time
@trap_time 4 күн бұрын
HOLL UP ON THAT INTRO 🔥
@ruaidhrimulgrew6568
@ruaidhrimulgrew6568 3 жыл бұрын
Amazing tutorial all round
@DevSage
@DevSage 3 жыл бұрын
Thank you!
@FlySoloG
@FlySoloG 3 жыл бұрын
love it!
@dadebarlow1883
@dadebarlow1883 4 жыл бұрын
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.
@kartheek6495
@kartheek6495 Жыл бұрын
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?
@fancyspirits3424
@fancyspirits3424 4 жыл бұрын
Thanks it really worked
@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.
@akalabayapal9634
@akalabayapal9634 3 жыл бұрын
Thanks very much Sir. . this will help me to complete my antivirus project
@vaishnaviravibhavsar1270
@vaishnaviravibhavsar1270 Ай бұрын
project sounds interesting could you provide me your Github
@ne9835
@ne9835 4 жыл бұрын
Hey man CodingPhase sends me here, you can code man keep doing your thing!
@DevSage
@DevSage 4 жыл бұрын
Appreciate ya
@ne9835
@ne9835 4 жыл бұрын
@@DevSage Yeah man👌
@adriansrfr
@adriansrfr Жыл бұрын
Ty!
@nataliapalweski2072
@nataliapalweski2072 3 жыл бұрын
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
@programmingholic
@programmingholic Жыл бұрын
Thanks so much ,
@Kevin-te7rr
@Kevin-te7rr 4 жыл бұрын
Hey bro, CodingPhase sent me here, can you walk us through on how you build your portfolio subscribed : )
@jacobweaver8505
@jacobweaver8505 3 жыл бұрын
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?
@haopeiyang3443
@haopeiyang3443 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.
@xiaolong9446
@xiaolong9446 3 жыл бұрын
Amazin!!!
@devartspecial1486
@devartspecial1486 3 жыл бұрын
JLP :D
@anuramkalyan875
@anuramkalyan875 3 жыл бұрын
Thanks!
@DevSage
@DevSage 3 жыл бұрын
No problem!
@prestonjudearnold2814
@prestonjudearnold2814 4 жыл бұрын
thank you
@escapefelicity2913
@escapefelicity2913 7 ай бұрын
well done
@adityavaste3732
@adityavaste3732 2 жыл бұрын
great video..
@DevSage
@DevSage 2 жыл бұрын
Thanks!
@JeffPittman
@JeffPittman 3 жыл бұрын
Awesome
@PlushCreativeDzyneLLC
@PlushCreativeDzyneLLC 3 жыл бұрын
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
@heuheuheh
@heuheuheh 4 жыл бұрын
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 KZbin (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 жыл бұрын
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 жыл бұрын
@@DevSage Will check it out, thanks again! Cheers!
@jasonstatham2422
@jasonstatham2422 3 жыл бұрын
Hey I want to know the name of the tune that you have played in the beginning 😂
@DevSage
@DevSage 3 жыл бұрын
Something I made with Mixcraft
@es_stinkt_puhfelix6293
@es_stinkt_puhfelix6293 2 жыл бұрын
amazing tutorial. 6 stars out of 5 i swear
@ambujsahu8162
@ambujsahu8162 Жыл бұрын
nice video
@auroraiiit5765
@auroraiiit5765 4 жыл бұрын
@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
@anzaralim3616
@anzaralim3616 4 жыл бұрын
All those AD networks want your location 😂
@viridiantelamon
@viridiantelamon Жыл бұрын
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.
@mtaskomur
@mtaskomur Жыл бұрын
it worked thanks. but I couldn't block the ads coming in between youtube videos. what is the way to it?
@inspectorlunge3887
@inspectorlunge3887 3 жыл бұрын
@DevSage Do you know if this could all be coded in notepad, or would I need an API/sdk?
@DevSage
@DevSage 3 жыл бұрын
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 3 жыл бұрын
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.
@RetroEcoChicken
@RetroEcoChicken Жыл бұрын
the spaces in manifest are very important
@myithspa25
@myithspa25 4 ай бұрын
Something on KZbin 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.
@jashimkhan3159
@jashimkhan3159 4 жыл бұрын
Awesome Tutorial!!! Subscribed..........
@DevSage
@DevSage 4 жыл бұрын
Thank you!
@jashimkhan3159
@jashimkhan3159 4 жыл бұрын
@@DevSage Love from Bangladesh......
@ishaantek
@ishaantek 3 жыл бұрын
Hi there. thank you so much for the video. Can you tell me how to block more than one website? Thank you!
@sticktock2448
@sticktock2448 8 ай бұрын
Here after my encounter with KZbin's anti adblocker campaign.
@davidsupolik1860
@davidsupolik1860 7 ай бұрын
i have like 1000 rows of ad sites if you want.
@sticktock2448
@sticktock2448 7 ай бұрын
@@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.
@PlushCreativeDzyneLLC
@PlushCreativeDzyneLLC 3 жыл бұрын
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.
@drool3616
@drool3616 2 жыл бұрын
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
@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?
@hanjelly5410
@hanjelly5410 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?
@TG-wg4tw
@TG-wg4tw 2 жыл бұрын
I'm wondering this as well. Have you found it yet ?
@wasted-o453ahmad6
@wasted-o453ahmad6 2 жыл бұрын
tabnine
@hrishikssh
@hrishikssh 2 жыл бұрын
brother , the extension is not blocking the pages i want it to .. can u tell me a solution
@amuga_1
@amuga_1 4 ай бұрын
blocking the money thirsty advertisers yes! I love it !
@thegamerdevil6883
@thegamerdevil6883 3 жыл бұрын
Does this adblocker word with youtube? Also, can you make a Part 2 showing how to make it undetected?
@Tec4Help
@Tec4Help 3 жыл бұрын
it is undetected.
@jorginh_o
@jorginh_o 4 жыл бұрын
@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..
@georgilos9899
@georgilos9899 Жыл бұрын
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 ?
@adityavaste3732
@adityavaste3732 2 жыл бұрын
How do I get a list of filter keywords? Does anyone know? Please suggest.
@nguyencaotai412
@nguyencaotai412 3 жыл бұрын
You can block ads to google?
@andymarkov8081
@andymarkov8081 3 жыл бұрын
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
@akashreddyjammula
@akashreddyjammula 8 ай бұрын
Will this works with blocking youtube adds.
@mamedulislam2629
@mamedulislam2629 2 жыл бұрын
Great
@DevSage
@DevSage 2 жыл бұрын
Thanks!
@dmoney_thegreat
@dmoney_thegreat 2 жыл бұрын
would you be able to do a video using manifest 3?
@DevSage
@DevSage 2 жыл бұрын
I'll definitely consider it
@powerebyAI
@powerebyAI Жыл бұрын
hi this software cannot block youtube ads. how can I make him prevent this?
@PTS8
@PTS8 Жыл бұрын
im getting error on manifest where we did it 2
@vntconcept
@vntconcept 2 жыл бұрын
how to build adblock for wordpress plugin to stop redirect page?
@DevSage
@DevSage 2 жыл бұрын
I have no idea
@fu2201
@fu2201 Жыл бұрын
Failed to load extension File ~\Desktop\AdBlocker Error Could not load background script 'background.json'. Could not load manifest.
@Jacob13044
@Jacob13044 Жыл бұрын
it should be manifest.json and background.js not background.json
@jerin_stephen
@jerin_stephen 4 жыл бұрын
how to do it for fire fox
@samuelyarasani3556
@samuelyarasani3556 2 жыл бұрын
Great vid, but the thumbnail looks a lot like fiership's
@DevSage
@DevSage 2 жыл бұрын
Thanks. The thumbnail is inspired by Fireship
@shyama5612
@shyama5612 8 ай бұрын
Great intro. Does this work in 2023?
@sarthakrana3703
@sarthakrana3703 2 жыл бұрын
BUT HOW TO MAKE KZbin VIDEO AD BLOCKER ?
@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.....
@astronaut736
@astronaut736 3 жыл бұрын
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.
@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?
@garrettmcguire5454
@garrettmcguire5454 3 жыл бұрын
disregard the above, i fixed it!
@YouTubeMillionaire456
@YouTubeMillionaire456 3 жыл бұрын
how?
@saumyaranjan7703
@saumyaranjan7703 3 жыл бұрын
@@garrettmcguire5454 how did u resolve that i 'm getting the same error can u plz help me.
@izharahmed7463
@izharahmed7463 5 ай бұрын
can i block youtube ads
@blecomp
@blecomp 4 жыл бұрын
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
@escapefelicity2913
@escapefelicity2913 7 ай бұрын
I need an extension to stop mouseovers
@sefe4558
@sefe4558 3 жыл бұрын
it gives me an error on default filters what should i do ?
@scottpizzakingdom
@scottpizzakingdom 3 жыл бұрын
i have the same problem
@ThunderStormFortnite
@ThunderStormFortnite 4 жыл бұрын
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
@user-ez6dn5do9p
@user-ez6dn5do9p 2 ай бұрын
Hey man, could you create a chrome extension to automatically save liked facebook videos?
@DevSage
@DevSage 25 күн бұрын
As in, is it possible? Yeah I don't see why not,
@user-ez6dn5do9p
@user-ez6dn5do9p 25 күн бұрын
@@DevSage As in i tried building it but failed
@hemangchaudhary4700
@hemangchaudhary4700 3 жыл бұрын
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
@DevSage
@DevSage 3 жыл бұрын
Sure
@hemangchaudhary4700
@hemangchaudhary4700 3 жыл бұрын
@@DevSage Thanks :)
@bu1491
@bu1491 4 жыл бұрын
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 жыл бұрын
@@DevSage I want to build an extension that will allow me to "book" "buy" or "bid off a KZbin 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 жыл бұрын
@@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.
@jackleslie5612
@jackleslie5612 2 жыл бұрын
why does it not work for me
@pavansanthosh8085
@pavansanthosh8085 4 жыл бұрын
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!
@himanshikataria1231
@himanshikataria1231 3 жыл бұрын
Hey! What other IDE can be used other than Visual Studio?
@DevSage
@DevSage 3 жыл бұрын
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)
@guimguinleo
@guimguinleo 2 жыл бұрын
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!
@funwithalbi4504
@funwithalbi4504 3 жыл бұрын
it says: Could not load background script 'background.js'. Could not load manifest. later: It works thanks!
@SB-ns4nw
@SB-ns4nw 2 жыл бұрын
same here... how you fixed?
@SB-ns4nw
@SB-ns4nw 2 жыл бұрын
got it.. place background.js into the main Folder. i created it into icons folder
@user-pq1zz7lm2e
@user-pq1zz7lm2e 27 күн бұрын
Not aggressive comment im just newbe ㅠㅠ this look like website blocker am i got it right?
@DevSage
@DevSage 25 күн бұрын
It's a network request blocker.
@arunshukla5664
@arunshukla5664 8 ай бұрын
Does this work in 2023 with the new YT annoying popup?
@devcode9290
@devcode9290 3 жыл бұрын
Thanks a lot for the video! Like & Subscribe )
@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
@vietnguyenc6612
@vietnguyenc6612 3 жыл бұрын
Are you Kyle?
@DevSage
@DevSage 3 жыл бұрын
No
@avi12
@avi12 3 жыл бұрын
Sadly this video is only relevant to Manifest v2 Manifest v3's network blocking works a little differently
@illusio6504
@illusio6504 2 жыл бұрын
it block youtube ads
@subhadipsur7561
@subhadipsur7561 3 жыл бұрын
Like WhiteHat Hackers. Love it.
@crysosancher
@crysosancher 2 жыл бұрын
Not working
@ItzPikachoo
@ItzPikachoo Жыл бұрын
Simple i agree but it's not working as a blocker
@mihirsavla3233
@mihirsavla3233 2 жыл бұрын
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
@DevSage
@DevSage 2 жыл бұрын
😂😂😂
@projektdarkside8499
@projektdarkside8499 2 жыл бұрын
is not ad block but only webpage blocker OMG
@kizoyo6414
@kizoyo6414 3 жыл бұрын
I have 2 Errors and i want to fix it. The two errors are: Could not load the manifest file Could not load 'image.png' from 'icons' For more info, here it is : prnt.sc/trdxsc
@domaincontroller
@domaincontroller 3 жыл бұрын
01:42 manifest.json
Javascript Design Patterns #1 - Factory Pattern
10:12
DevSage
Рет қаралды 157 М.
Full Tutorial | Building a Chrome Extension in Typescript and Vite
32:58
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 17 МЛН
11.3: Chrome Extensions: Content Scripts - Programming with Text
16:55
The Coding Train
Рет қаралды 224 М.
Build an AD BLOCKER Chrome Extension in Less Than 10 Minutes
8:06
How to Create Your Chrome Extension Using AI
8:23
Website Learners
Рет қаралды 25 М.
Build Your First Machine Learning AI With Neural Networks
22:09
Web Dev Simplified
Рет қаралды 111 М.
11.4: Chrome Extensions: Background Scripts - Programming with Text
16:20
The Coding Train
Рет қаралды 156 М.
I Built My First Google Chrome Extension!
20:52
James Q Quick
Рет қаралды 55 М.
The simplest way to automate your browser for FREE
20:53
Mike Powers
Рет қаралды 81 М.
Coding A Chrome Extension in JavaScript Tutorial
23:03
PedroTech
Рет қаралды 73 М.