{"action":"created","issue":{"url":"https://api.github.com/repos/sul-dlss/sul-embed/issues/236","labels_url":"https://api.github.com/repos/sul-dlss/sul-embed/issues/236/labels{/name}","comments_url":"https://api.github.com/repos/sul-dlss/sul-embed/issues/236/comments","events_url":"https://api.github.com/repos/sul-dlss/sul-embed/issues/236/events","html_url":"https://github.com/sul-dlss/sul-embed/issues/236","id":75373056,"number":236,"title":"Improperly scoped javascript in common viewer","user":{"login":"jkeck","id":96776,"avatar_url":"https://avatars.githubusercontent.com/u/96776?v=3","gravatar_id":"","url":"https://api.github.com/users/jkeck","html_url":"https://github.com/jkeck","followers_url":"https://api.github.com/users/jkeck/followers","following_url":"https://api.github.com/users/jkeck/following{/other_user}","gists_url":"https://api.github.com/users/jkeck/gists{/gist_id}","starred_url":"https://api.github.com/users/jkeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkeck/subscriptions","organizations_url":"https://api.github.com/users/jkeck/orgs","repos_url":"https://api.github.com/users/jkeck/repos","events_url":"https://api.github.com/users/jkeck/events{/privacy}","received_events_url":"https://api.github.com/users/jkeck/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sul-dlss/sul-embed/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-11T22:01:41Z","updated_at":"2015-08-21T16:22:50Z","closed_at":null,"body":"See https://github.com/sul-dlss/spotlight/issues/1150#issuecomment-101060486\r\n\r\nhttps://github.com/sul-dlss/sul-embed/blob/master/app/assets/javascripts/modules/common_viewer_behavior.js#L30 acts on the first instance of the embed on the page and will not allow multiple embeds to exist on the same page."},"comment":{"url":"https://api.github.com/repos/sul-dlss/sul-embed/issues/comments/133480647","html_url":"https://github.com/sul-dlss/sul-embed/issues/236#issuecomment-133480647","issue_url":"https://api.github.com/repos/sul-dlss/sul-embed/issues/236","id":133480647,"user":{"login":"mejackreed","id":1656824,"avatar_url":"https://avatars.githubusercontent.com/u/1656824?v=3","gravatar_id":"","url":"https://api.github.com/users/mejackreed","html_url":"https://github.com/mejackreed","followers_url":"https://api.github.com/users/mejackreed/followers","following_url":"https://api.github.com/users/mejackreed/following{/other_user}","gists_url":"https://api.github.com/users/mejackreed/gists{/gist_id}","starred_url":"https://api.github.com/users/mejackreed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mejackreed/subscriptions","organizations_url":"https://api.github.com/users/mejackreed/orgs","repos_url":"https://api.github.com/users/mejackreed/repos","events_url":"https://api.github.com/users/mejackreed/events{/privacy}","received_events_url":"https://api.github.com/users/mejackreed/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T16:22:50Z","updated_at":"2015-08-21T16:22:50Z","body":"Yep this will need to be part of a larger refactor effort to enable multiple embeds within the same page.\r\n\r\nA lot of todos here, including:\r\n\r\n - Id's used in elements will need to be unique (druid prefix/suffix?)\r\n - js selections should not be global but within the context of the element\r\n - css injection should check if css is already in page before injecting again\r\n"}}