{"action":"closed","issue":{"url":"https://api.github.com/repos/google/u2f-ref-code/issues/30","labels_url":"https://api.github.com/repos/google/u2f-ref-code/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/google/u2f-ref-code/issues/30/comments","events_url":"https://api.github.com/repos/google/u2f-ref-code/issues/30/events","html_url":"https://github.com/google/u2f-ref-code/issues/30","id":81965337,"number":30,"title":"[u2f-chrome-extension] do not change u2f if already implemented","user":{"login":"AxelNennker","id":1721863,"avatar_url":"https://avatars.githubusercontent.com/u/1721863?v=3","gravatar_id":"","url":"https://api.github.com/users/AxelNennker","html_url":"https://github.com/AxelNennker","followers_url":"https://api.github.com/users/AxelNennker/followers","following_url":"https://api.github.com/users/AxelNennker/following{/other_user}","gists_url":"https://api.github.com/users/AxelNennker/gists{/gist_id}","starred_url":"https://api.github.com/users/AxelNennker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AxelNennker/subscriptions","organizations_url":"https://api.github.com/users/AxelNennker/orgs","repos_url":"https://api.github.com/users/AxelNennker/repos","events_url":"https://api.github.com/users/AxelNennker/events{/privacy}","received_events_url":"https://api.github.com/users/AxelNennker/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-28T14:52:39Z","updated_at":"2015-05-28T14:55:32Z","closed_at":"2015-05-28T14:55:32Z","body":"u2f-chrome-extension\r\n\r\nLines like\r\nhttps://github.com/google/u2f-ref-code/blob/master/u2f-chrome-extension/u2f-api.js#L25\r\n  u2f.EXTENSION_ID = 'pfboblefjcgdjicmnffhdgionmgcdmne';\r\noverwrite an existing u2f implementation.\r\n\r\nI think that if chrome already has defined window.u2f then the extension should not redefine it.\r\n\r\nif (!(\"u2f\" in window)) {\r\n  var _gu2f = {\r\n    EXTENSION_ID = 'pfboblefjcgdjicmnffhdgionmgcdmne',\r\n    ...\r\n  };\r\n  window.u2f = _gu2f;\r\n}\r\n\r\n\r\n"}}