{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/Docusaurus/issues/848","repository_url":"https://api.github.com/repos/facebook/Docusaurus","labels_url":"https://api.github.com/repos/facebook/Docusaurus/issues/848/labels{/name}","comments_url":"https://api.github.com/repos/facebook/Docusaurus/issues/848/comments","events_url":"https://api.github.com/repos/facebook/Docusaurus/issues/848/events","html_url":"https://github.com/facebook/Docusaurus/issues/848","id":340558848,"node_id":"MDU6SXNzdWUzNDA1NTg4NDg=","number":848,"title":"Allow adding attributes to import of scripts and styles","user":{"login":"muuvmuuv","id":11534760,"node_id":"MDQ6VXNlcjExNTM0NzYw","avatar_url":"https://avatars3.githubusercontent.com/u/11534760?v=4","gravatar_id":"","url":"https://api.github.com/users/muuvmuuv","html_url":"https://github.com/muuvmuuv","followers_url":"https://api.github.com/users/muuvmuuv/followers","following_url":"https://api.github.com/users/muuvmuuv/following{/other_user}","gists_url":"https://api.github.com/users/muuvmuuv/gists{/gist_id}","starred_url":"https://api.github.com/users/muuvmuuv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muuvmuuv/subscriptions","organizations_url":"https://api.github.com/users/muuvmuuv/orgs","repos_url":"https://api.github.com/users/muuvmuuv/repos","events_url":"https://api.github.com/users/muuvmuuv/events{/privacy}","received_events_url":"https://api.github.com/users/muuvmuuv/received_events","type":"User","site_admin":false},"labels":[{"id":630651493,"node_id":"MDU6TGFiZWw2MzA2NTE0OTM=","url":"https://api.github.com/repos/facebook/Docusaurus/labels/bug","name":"bug","color":"ee0701","default":true},{"id":772755961,"node_id":"MDU6TGFiZWw3NzI3NTU5NjE=","url":"https://api.github.com/repos/facebook/Docusaurus/labels/good%20first%20issue","name":"good first issue","color":"7057ff","default":true},{"id":630651496,"node_id":"MDU6TGFiZWw2MzA2NTE0OTY=","url":"https://api.github.com/repos/facebook/Docusaurus/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-12T09:28:27Z","updated_at":"2018-09-01T10:52:27Z","closed_at":null,"author_association":"NONE","body":"## 🐛 Bug Report\r\n\r\nI get an error when loading scripts from a CDN because there is no hash set to the CDN Url. This could be fixed by giving more options to the `scripts`-array in the config:\r\n\r\n> Additionally this would add support for `async` and `defer`attributes\r\n\r\n```javascript\r\nconst config = {\r\n  scripts: [\r\n    {\r\n      src: \"https://cdnjs.cloudflare.com/ajax/libs/featherlight/1.7.13/featherlight.min.js\",\r\n      integrity: \"sha256-/SEQTcl9tvyYDA8SuhV/PMn92shN3kNn8C9vnbBcE9Y=\",\r\n      crossorigin: \"anonymous\",\r\n      async: true\r\n    },\r\n    \"../js/theme.js\",\r\n  ]\r\n};\r\n```\r\n\r\n### Have you read the [Contributing Guidelines on issues](https://github.com/facebook/Docusaurus/blob/master/CONTRIBUTING.md#reporting-new-issues)?\r\n\r\nyes\r\n\r\n## To Reproduce\r\n\r\n1. new Docusaurus\r\n2. add CDN script\r\n3. run locally\r\n4. see the console\r\n\r\n## Expected behaviour\r\n\r\nno error in the console\r\n\r\n(Write what you thought would happen.)\r\n\r\n## Actual Behavior\r\n\r\nError in the console:\r\n\r\n```\r\nRefused to execute inline event handler because it violates the following Content Security Policy directive: \"script-src https:\". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.\r\n```\r\n\r\n(Write what happened. Add screenshots, if applicable.)\r\n\r\n## Reproducible Demo\r\n\r\nhttps://hastebin.com/elawucenon.js\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/Docusaurus/issues/comments/417850391","html_url":"https://github.com/facebook/Docusaurus/issues/848#issuecomment-417850391","issue_url":"https://api.github.com/repos/facebook/Docusaurus/issues/848","id":417850391,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzg1MDM5MQ==","user":{"login":"endiliey","id":17883920,"node_id":"MDQ6VXNlcjE3ODgzOTIw","avatar_url":"https://avatars3.githubusercontent.com/u/17883920?v=4","gravatar_id":"","url":"https://api.github.com/users/endiliey","html_url":"https://github.com/endiliey","followers_url":"https://api.github.com/users/endiliey/followers","following_url":"https://api.github.com/users/endiliey/following{/other_user}","gists_url":"https://api.github.com/users/endiliey/gists{/gist_id}","starred_url":"https://api.github.com/users/endiliey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endiliey/subscriptions","organizations_url":"https://api.github.com/users/endiliey/orgs","repos_url":"https://api.github.com/users/endiliey/repos","events_url":"https://api.github.com/users/endiliey/events{/privacy}","received_events_url":"https://api.github.com/users/endiliey/received_events","type":"User","site_admin":false},"created_at":"2018-09-01T10:52:27Z","updated_at":"2018-09-01T10:52:27Z","author_association":"COLLABORATOR","body":"@wszgxa sure 👍. Send a PR in"}}
{"actor":{"display_login":"endiliey"}}