Skip to content

Instantly share code, notes, and snippets.

@Ajnasz
Last active October 1, 2017 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ajnasz/fb7777184200504d4e47ad892583984a to your computer and use it in GitHub Desktop.
Save Ajnasz/fb7777184200504d4e47ad892583984a to your computer and use it in GitHub Desktop.
youtube embed blocker webextension
chrome.webRequest.onBeforeRequest.addListener(
function(requestDetails){
console.log('Loading: ' + requestDetails.url);
return { cancel: true };
},
{urls: ['*://www.youtube.com/embed/*']},
['blocking']
);
{
"description": "some test",
"manifest_version": 2,
"name": "testttt",
"version": "1.0",
"applications": {
"gecko": {
"id": "testttt@mozilla.org"
}
},
"permissions": [
"webRequest",
"webRequestBlocking",
"<all_urls>"
],
"background": {
"scripts": [
"background.js"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment