{"action":"created","issue":{"url":"https://api.github.com/repos/intoli/remote-browser/issues/71","repository_url":"https://api.github.com/repos/intoli/remote-browser","labels_url":"https://api.github.com/repos/intoli/remote-browser/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/intoli/remote-browser/issues/71/comments","events_url":"https://api.github.com/repos/intoli/remote-browser/issues/71/events","html_url":"https://github.com/intoli/remote-browser/issues/71","id":341148295,"node_id":"MDU6SXNzdWUzNDExNDgyOTU=","number":71,"title":"How to intercept requests?","user":{"login":"Raidus","id":8803882,"node_id":"MDQ6VXNlcjg4MDM4ODI=","avatar_url":"https://avatars3.githubusercontent.com/u/8803882?v=4","gravatar_id":"","url":"https://api.github.com/users/Raidus","html_url":"https://github.com/Raidus","followers_url":"https://api.github.com/users/Raidus/followers","following_url":"https://api.github.com/users/Raidus/following{/other_user}","gists_url":"https://api.github.com/users/Raidus/gists{/gist_id}","starred_url":"https://api.github.com/users/Raidus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raidus/subscriptions","organizations_url":"https://api.github.com/users/Raidus/orgs","repos_url":"https://api.github.com/users/Raidus/repos","events_url":"https://api.github.com/users/Raidus/events{/privacy}","received_events_url":"https://api.github.com/users/Raidus/received_events","type":"User","site_admin":false},"labels":[{"id":860619391,"node_id":"MDU6TGFiZWw4NjA2MTkzOTE=","url":"https://api.github.com/repos/intoli/remote-browser/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"sangaline","id":8236564,"node_id":"MDQ6VXNlcjgyMzY1NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/8236564?v=4","gravatar_id":"","url":"https://api.github.com/users/sangaline","html_url":"https://github.com/sangaline","followers_url":"https://api.github.com/users/sangaline/followers","following_url":"https://api.github.com/users/sangaline/following{/other_user}","gists_url":"https://api.github.com/users/sangaline/gists{/gist_id}","starred_url":"https://api.github.com/users/sangaline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangaline/subscriptions","organizations_url":"https://api.github.com/users/sangaline/orgs","repos_url":"https://api.github.com/users/sangaline/repos","events_url":"https://api.github.com/users/sangaline/events{/privacy}","received_events_url":"https://api.github.com/users/sangaline/received_events","type":"User","site_admin":false},"assignees":[{"login":"sangaline","id":8236564,"node_id":"MDQ6VXNlcjgyMzY1NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/8236564?v=4","gravatar_id":"","url":"https://api.github.com/users/sangaline","html_url":"https://github.com/sangaline","followers_url":"https://api.github.com/users/sangaline/followers","following_url":"https://api.github.com/users/sangaline/following{/other_user}","gists_url":"https://api.github.com/users/sangaline/gists{/gist_id}","starred_url":"https://api.github.com/users/sangaline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangaline/subscriptions","organizations_url":"https://api.github.com/users/sangaline/orgs","repos_url":"https://api.github.com/users/sangaline/repos","events_url":"https://api.github.com/users/sangaline/events{/privacy}","received_events_url":"https://api.github.com/users/sangaline/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-07-13T20:22:19Z","updated_at":"2018-07-13T21:07:43Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI'm figuring out how to intercept requests. I have to following snippet inside my code:\r\n\r\n``` javascript\r\n    browser.webRequest.onBeforeRequest.addListener(\r\n      function(details) {\r\n        return { cancel: details.url.indexOf('news.ycombinator.com') != -1 };\r\n      },\r\n      { urls: ['<all_urls>'] },\r\n      ['blocking'],\r\n    );\r\n```\r\n\r\nInside the manifest.json (remote-browser module) I've following permissions:\r\n\r\n``` json\r\n\"permissions\": [\"<all_urls>\", \"tabs\", \"webRequest\", \"webRequestBlocking\"]\r\n```\r\n\r\nBut my code gives following error:\r\n\r\n`Invalid listener for webRequest.onBeforeRequest`\r\n\r\nWhat am I doing wrong?"},"comment":{"url":"https://api.github.com/repos/intoli/remote-browser/issues/comments/404954380","html_url":"https://github.com/intoli/remote-browser/issues/71#issuecomment-404954380","issue_url":"https://api.github.com/repos/intoli/remote-browser/issues/71","id":404954380,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDk1NDM4MA==","user":{"login":"sangaline","id":8236564,"node_id":"MDQ6VXNlcjgyMzY1NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/8236564?v=4","gravatar_id":"","url":"https://api.github.com/users/sangaline","html_url":"https://github.com/sangaline","followers_url":"https://api.github.com/users/sangaline/followers","following_url":"https://api.github.com/users/sangaline/following{/other_user}","gists_url":"https://api.github.com/users/sangaline/gists{/gist_id}","starred_url":"https://api.github.com/users/sangaline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangaline/subscriptions","organizations_url":"https://api.github.com/users/sangaline/orgs","repos_url":"https://api.github.com/users/sangaline/repos","events_url":"https://api.github.com/users/sangaline/events{/privacy}","received_events_url":"https://api.github.com/users/sangaline/received_events","type":"User","site_admin":false},"created_at":"2018-07-13T21:07:43Z","updated_at":"2018-07-13T21:07:43Z","author_association":"MEMBER","body":"Thanks, this is definitely a bug. The `browser.webRequest` was undefined due to a permissions issue which should now be fixed in v0.0.14. There also seems to be a problem with how the listener function is being serialized, I'll continue to look into this and give an update here once it's been resolved."}}
{"actor":{"display_login":"sangaline"}}