Created
July 1, 2020 22:55
-
-
Save cwgreene/e79b3437ac8793633ce0f7d46c9ebf65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("hello world"); | |
chrome.webRequest.onBeforeRequest.addListener( | |
function(details) { | |
console.log(details); | |
if (details.url.match(/test/) && details.method=="POST"){ | |
console.log("hi"); | |
} | |
}, | |
{urls: ["<all_urls>"]}, | |
["blocking"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"manifest_version": 2, | |
"version":"1", | |
"name": "Test Extension", | |
"permissions": [ | |
"webRequest", | |
"webRequestBlocking", | |
"*://localhost:*/" | |
], | |
"background": | |
{ | |
"scripts":["code.js"], | |
"persistent": true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment