{"id":22615722,"url":"https://github.com/respoke/respoke-chrome-screen-sharing-extension","last_synced_at":"2025-07-23T10:07:06.944Z","repository":{"id":26625166,"uuid":"30080724","full_name":"respoke/respoke-chrome-screen-sharing-extension","owner":"respoke","description":"A generic chrome extension which enables screen sharing in chrome on the respoke platform","archived":false,"fork":false,"pushed_at":"2015-06-09T18:26:05.000Z","size":210,"stargazers_count":3,"open_issues_count":0,"forks_count":5,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-11T12:42:30.853Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.respoke.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/respoke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-30T16:35:29.000Z","updated_at":"2015-07-04T00:58:20.000Z","dependencies_parsed_at":"2022-09-01T13:51:52.222Z","dependency_job_id":null,"html_url":"https://github.com/respoke/respoke-chrome-screen-sharing-extension","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/respoke/respoke-chrome-screen-sharing-extension","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/respoke%2Frespoke-chrome-screen-sharing-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/respoke%2Frespoke-chrome-screen-sharing-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/respoke%2Frespoke-chrome-screen-sharing-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/respoke%2Frespoke-chrome-screen-sharing-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/respoke","download_url":"https://codeload.github.com/respoke/respoke-chrome-screen-sharing-extension/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/respoke%2Frespoke-chrome-screen-sharing-extension/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266658073,"owners_count":23963625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-08T19:09:12.337Z","updated_at":"2025-07-23T10:07:06.921Z","avatar_url":"https://github.com/respoke.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Respoke Sample Chrome Extension\n\nThis Chrome extension adds screen sharing capabilities for Chrome to the\n[Respoke.js library](https://github.com/respoke/respoke) for [Respoke](https://www.respoke.io). Since this is a\nChrome extension, it must be modified to match your app's domain name and then published to the Chrome Web Store.\n\n## Usage\n\n[Fork this code](https://github.com/respoke/respoke-chrome-extension/fork) to your own repo and then make the\nfollowing changes.\n\n1. Rename `manifest.json.sample` to `manifest.json`.\n2. Open `manifest.json` and change the title to the name of your web app.\n3. In the `permissions` list, list the domain names, ports and protocols that this extension should be enabled on. [Here is Google's documentation](https://developer.chrome.com/extensions/declare_permissions), but it should be as easy as adding one or more URLs with \"https://\", your domain name, and an optional path like \"/mysubdir/\\*\" \n\nNOTE: You must use SSL for screen sharing in chrome, so HTTP URLs will not work. You may use a wildcard to specify multiple subdomains, like \"https://\\*.example.com.\"\n\n```js\n    \"permissions\": [\n        \"tabs\",\n        \"desktopCapture\",\n        \"https://localhost:8080/*\",\n        \"https://*.example.com/*\",\n        \"https://example.com/video/*\"\n    ],\n\n```\n\nThe `tabs` permission allows you to load the extension after an inline installation.\n\n4. Add these same entries in the `content_scripts` section inside the `matches` list.\n\n```js\n    \"content_scripts\": [{\n        \"matches\": [\"https://localhost:8080/*\", \"https://*.example.com/*\", \"https://example.com/video/*\"],\n        \"js\": [\"content.js\"],\n        \"run_at\": \"document_end\"\n    }]\n```\n\nThat's all! Now just [publish your Chrome extension](https://developer.chrome.com/webstore/publish) and [prompt your users to install it](https://developer.chrome.com/webstore/inline_installation).\n\n## Inline install\n\nInline installation can only occur due to a user action, such as a click on a button that you (as the developer) control.\n\n```js\nfunction clickExtension(e){\n  e.preventDefault();\n  chrome.webstore.install('https://chrome.google.com/webstore/detail/\u003cchrome-extension-app-id\u003e', function(){\n      console.log('Successfully installed Chrome Extension');\n  }, function(err){\n      console.log('Error installing extension in chrome', err);\n  });\n}\n```\n\nTo allow inline installation, a special `link` element must be present on the page.\n\n```html\n\u003clink rel=\"chrome-webstore-item\" href=\"'https://chrome.google.com/webstore/detail/\u003cchrome-extension-app-id\u003e'\"\u003e\n```\n\n## When is the extension loaded?\n\nDue to the nature of the extension extending the `respoke.js` library, it has to load after the library; at `document_end`. This means that it runs after all of your Javascript too.\n\nThat means that having a block of javascript, as below, won't tell you if the extension is installed/loaded.\n\n```js\nif (!respoke.needsChromeExtension || respoke.hasChromeExtension) {\n    //remove our install button\n}\n```\n\nThis is because the `respoke.js` library loads, then your javascript runs and then the extension tells the `respoke.js` library that it's available.\n\nTo get around this, the `respoke.js` library fires an event when any respoke enabled extension loads.\n\n```js\nrespoke.listen('extension-loaded', function(data){\n    console.log('extension loaded', data);\n    if (!respoke.needsChromeExtension || respoke.hasChromeExtension) {\n        //remove an inline installation button\n    }\n});\n```\n\nThe `extension-loaded` event will fire for any kind of respoke based extension, with data to tell you which extension. In this case, the data looks like this:\n\n```js\n{\n    type: 'screen-sharing'\n}\n\n```\n\n# License\n\nRespoke Screen Sharing Chrome extension is licensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frespoke%2Frespoke-chrome-screen-sharing-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frespoke%2Frespoke-chrome-screen-sharing-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frespoke%2Frespoke-chrome-screen-sharing-extension/lists"}