{"action":"created","issue":{"url":"https://api.github.com/repos/zalmoxisus/crossbuilder/issues/37","repository_url":"https://api.github.com/repos/zalmoxisus/crossbuilder","labels_url":"https://api.github.com/repos/zalmoxisus/crossbuilder/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/zalmoxisus/crossbuilder/issues/37/comments","events_url":"https://api.github.com/repos/zalmoxisus/crossbuilder/issues/37/events","html_url":"https://github.com/zalmoxisus/crossbuilder/issues/37","id":143761192,"number":37,"title":"Efficient way to add more content scripts","user":{"login":"brandonmp","id":14139991,"avatar_url":"https://avatars.githubusercontent.com/u/14139991?v=3","gravatar_id":"","url":"https://api.github.com/users/brandonmp","html_url":"https://github.com/brandonmp","followers_url":"https://api.github.com/users/brandonmp/followers","following_url":"https://api.github.com/users/brandonmp/following{/other_user}","gists_url":"https://api.github.com/users/brandonmp/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonmp/subscriptions","organizations_url":"https://api.github.com/users/brandonmp/orgs","repos_url":"https://api.github.com/users/brandonmp/repos","events_url":"https://api.github.com/users/brandonmp/events{/privacy}","received_events_url":"https://api.github.com/users/brandonmp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-27T00:11:56Z","updated_at":"2016-03-28T09:47:54Z","closed_at":null,"body":"I'm new to Chrome extensions, so forgive me if this question isn't unique to this project.\r\n\r\nI'm trying to add multiple content scripts, each of which injects into a different url.  \r\n\r\nIs there a straightforward way to do this? So far the best i can figure out is:\r\n\r\n1. Add new content .js file to browser/extension/inject\r\n2. update manifest.json to inject the new script into the correct URL\r\n3. update the extension webpack to bundle the new script into a separate bundle\r\n4. update the dev webpack to output the new script separately\r\n\r\n\r\nHowever, that a) seems way too complicated and b) isn't working for me.  \r\n\r\nhas anyone done this? My content scripts are too big to inject in every page."},"comment":{"url":"https://api.github.com/repos/zalmoxisus/crossbuilder/issues/comments/202323876","html_url":"https://github.com/zalmoxisus/crossbuilder/issues/37#issuecomment-202323876","issue_url":"https://api.github.com/repos/zalmoxisus/crossbuilder/issues/37","id":202323876,"user":{"login":"zalmoxisus","id":7957859,"avatar_url":"https://avatars.githubusercontent.com/u/7957859?v=3","gravatar_id":"","url":"https://api.github.com/users/zalmoxisus","html_url":"https://github.com/zalmoxisus","followers_url":"https://api.github.com/users/zalmoxisus/followers","following_url":"https://api.github.com/users/zalmoxisus/following{/other_user}","gists_url":"https://api.github.com/users/zalmoxisus/gists{/gist_id}","starred_url":"https://api.github.com/users/zalmoxisus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalmoxisus/subscriptions","organizations_url":"https://api.github.com/users/zalmoxisus/orgs","repos_url":"https://api.github.com/users/zalmoxisus/repos","events_url":"https://api.github.com/users/zalmoxisus/events{/privacy}","received_events_url":"https://api.github.com/users/zalmoxisus/received_events","type":"User","site_admin":false},"created_at":"2016-03-28T09:47:53Z","updated_at":"2016-03-28T09:47:53Z","body":"Yes, you shouldn't include React there for sure, probably you'll use something like [here](https://github.com/zalmoxisus/crossbuilder/blob/v0.1.0/src/browser/extension/inject/index.js).\r\n\r\nIf you don't want to have a lot of files with scripts for every case, then yes, better not to inject through manifest, but just inject the script body directly. Something like [here](https://github.com/zalmoxisus/crossbuilder/blob/master/src/browser/extension/background/inject.js#L29).\r\n"}}