{"action":"created","issue":{"url":"https://api.github.com/repos/RequestPolicyContinued/requestpolicy/issues/863","repository_url":"https://api.github.com/repos/RequestPolicyContinued/requestpolicy","labels_url":"https://api.github.com/repos/RequestPolicyContinued/requestpolicy/issues/863/labels{/name}","comments_url":"https://api.github.com/repos/RequestPolicyContinued/requestpolicy/issues/863/comments","events_url":"https://api.github.com/repos/RequestPolicyContinued/requestpolicy/issues/863/events","html_url":"https://github.com/RequestPolicyContinued/requestpolicy/issues/863","id":270894173,"number":863,"title":"Redirection Notification in WE","user":{"login":"myrdd","id":4286829,"avatar_url":"https://avatars2.githubusercontent.com/u/4286829?v=4","gravatar_id":"","url":"https://api.github.com/users/myrdd","html_url":"https://github.com/myrdd","followers_url":"https://api.github.com/users/myrdd/followers","following_url":"https://api.github.com/users/myrdd/following{/other_user}","gists_url":"https://api.github.com/users/myrdd/gists{/gist_id}","starred_url":"https://api.github.com/users/myrdd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myrdd/subscriptions","organizations_url":"https://api.github.com/users/myrdd/orgs","repos_url":"https://api.github.com/users/myrdd/repos","events_url":"https://api.github.com/users/myrdd/events{/privacy}","received_events_url":"https://api.github.com/users/myrdd/received_events","type":"User","site_admin":false},"labels":[{"id":140175953,"url":"https://api.github.com/repos/RequestPolicyContinued/requestpolicy/labels/good%20first%20issue","name":"good first issue","color":"009800","default":true},{"id":111972270,"url":"https://api.github.com/repos/RequestPolicyContinued/requestpolicy/labels/help%20wanted","name":"help wanted","color":"009800","default":true},{"id":123744123,"url":"https://api.github.com/repos/RequestPolicyContinued/requestpolicy/labels/Priority:%20P1","name":"Priority: P1","color":"000000","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-03T07:13:11Z","updated_at":"2017-11-03T07:30:49Z","closed_at":null,"author_association":"OWNER","body":"The redirection notification currently looks like this:\r\n\r\n![redirection notification screenshot](https://user-images.githubusercontent.com/4286829/31369529-7179e5d6-ad85-11e7-8edc-bda9618695e3.png)\r\n\r\nIn the WebExtension (WE) environment, there's no such notification bar, so I'd suggest to use a [page action](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/page_action) to implement the same feature in the WE version."},"comment":{"url":"https://api.github.com/repos/RequestPolicyContinued/requestpolicy/issues/comments/341636665","html_url":"https://github.com/RequestPolicyContinued/requestpolicy/issues/863#issuecomment-341636665","issue_url":"https://api.github.com/repos/RequestPolicyContinued/requestpolicy/issues/863","id":341636665,"user":{"login":"myrdd","id":4286829,"avatar_url":"https://avatars2.githubusercontent.com/u/4286829?v=4","gravatar_id":"","url":"https://api.github.com/users/myrdd","html_url":"https://github.com/myrdd","followers_url":"https://api.github.com/users/myrdd/followers","following_url":"https://api.github.com/users/myrdd/following{/other_user}","gists_url":"https://api.github.com/users/myrdd/gists{/gist_id}","starred_url":"https://api.github.com/users/myrdd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myrdd/subscriptions","organizations_url":"https://api.github.com/users/myrdd/orgs","repos_url":"https://api.github.com/users/myrdd/repos","events_url":"https://api.github.com/users/myrdd/events{/privacy}","received_events_url":"https://api.github.com/users/myrdd/received_events","type":"User","site_admin":false},"created_at":"2017-11-03T07:30:49Z","updated_at":"2017-11-03T07:30:49Z","author_association":"OWNER","body":"The notification should be implemented as a \"view\" module having a single function called `show()`:\r\n\r\n```js\r\nexport const RedirectionNotification = {\r\n  show(aTabId, aWindowId, aSource, aTarget, aEvents) {\r\n  },\r\n};\r\n```\r\n\r\n* `aTabId` / `aWindowId`: the tab and content window the notification corresponds to\r\n* `aSource` / `aTarget`: source/target URIs\r\n* `aEvents`: see below\r\n\r\n```js\r\nconst events = {\r\n  onAllow({tabId, windowId, source, target}) {},\r\n  onDeny({tabId, windowId, source, target}) {},\r\n  onRuleAdded({tabId, windowId, source, target, ruleSpec}) {},\r\n};\r\n```\r\n\r\nThe current implementation (locally on my PC) is available here: https://pastebin.mozilla.org/9071955\r\nSome code (e.g. `cropUri()` or the loop header (line 70–74)) can be reused from there."}}
{"actor":{"display_login":"myrdd"}}