How to catch search request when client will search something and find certain word in this request ,if exists page loading will be stopped (Search will be Cancelled) ?
UPDATE.
manifest.json:
"background": {
"scripts": ["background.js"]
}
"permissions": [
"tabs",
"webRequest",
"webNavigation",
"management",
"http://*/*",
"https://*/*",
"*://*.google.com/",
"webRequestBlocking",
"<all_urls>"
]
}
background.js:
chrome.webRequest.onBeforeRequest.addListener(
function(details) {
return {cancel: details.url.indexOf("://salom/") != -1};
},
{ urls: ["<all_urls>"] },
["blocking"]
);