You can add your own AdBlock extension to Chrome or Microsoft Edge using a very small amount of code.
Every extension must have a manifest file
{
“name”: “Brandon Adblocker”,
“version”: “1.0”,
“desciption”: “Brandon Adblocker”,
“permissions”: [“webRequest”, “webRequestBlocking”, “<all_urls>”],
“background”:{
“scripts”:[“background.js”]
},
“icons”:{
“16”: “icons/logo_16x16.png”,
“48”: “icons/logo_48x48.png”,
“128”: “icons/logo_128x128.png”
},
“manifest_version”: 2
}
The main area is in the URLS section of background.js
chrome.webRequest.onBeforeRequest.addListener(
function(details){ return { cancel: true }},
{ urls: [“*://*.zedo.com/*”]},
[“blocking”]
)
every URL you add will be blocked.
This extension is a quick and easy way to block ad sites or sites not blocked by other Adblock programs.
I did not publish this to the Chrome or Edge store to test your code make sure Chrome or Edge is in developer mode and upload it in .zip format.
| Repository Language: JavaScript |
| Last Updated: August 14, 2020 Size: 22,737k |
Download Name: AdBlock-Extension-Chrome-master.zip |
