1

I am trying to load and run a very basic extension that blocks all URLs but nothing happens. The MANIFEST.JSON file:

{
  "manifest_version": 2,
  "name": "Dial2Action",
  "description": "This is my description",
  "version": "1.0",
  "background": {"scripts":["background.js"]},
  "permissions": [
    "webRequest",
"webRequestBlocking",
"https://app.dial2web.com/"
  ]
}

and the background.js file:

chrome.webRequest.onBeforeRequest.addListener(
  function(details) { 
  return {cancel: true}; },
  {urls: ["<all_urls>"]},
  ["blocking"]);

I will be glad to get a hint or a reference to a working simple redirect extension.

Rob W
  • 341,306
  • 83
  • 791
  • 678
Simon
  • 509
  • 7
  • 25
  • Regarding your last note, see http://stackoverflow.com/questions/12065029/chrome-redirect-extension/12070823#12070823 – Rob W Oct 06 '13 at 10:30

1 Answers1

3

That's because you have only the block permission for "https://app.dial2web.com/". You need the permission for all urls:

 {
  "manifest_version": 2,
  // other stuff
  "permissions": [
    "webRequest",
    "webRequestBlocking",
    "<all_urls>"
 ]
}

This works fine for me.

Standard
  • 1,450
  • 17
  • 35