https://github.com/segmentio/chrome-sidebar
Easiest way to embed an iframe as a chrome extension
https://github.com/segmentio/chrome-sidebar
Last synced: over 1 year ago
JSON representation
Easiest way to embed an iframe as a chrome extension
- Host: GitHub
- URL: https://github.com/segmentio/chrome-sidebar
- Owner: segmentio
- Archived: true
- Created: 2017-05-14T19:39:13.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-07T11:35:04.000Z (about 3 years ago)
- Last Synced: 2024-10-28T16:13:04.328Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://open.segment.com
- Size: 956 KB
- Stars: 227
- Watchers: 4
- Forks: 58
- Open Issues: 35
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
chrome-sidebar
Easiest way to embed an iframe as a chrome extension
built by Segment
## Demo

## Features
- **6kb!** minified
- Completely customizable CSS that won't conflict with page styles
- Mount any iframe or React component
## Installation
```bash
yarn add chrome-sidebar
# or
npm install --save chrome-sidebar
```
### Example
```javascript
import React from 'react'
import ReactDOM from 'react-dom'
import { Frame } from 'chrome-sidebar'
import { url } from './settings'
if (Frame.isReady()) {
Frame.toggle()
} else {
boot()
}
function boot() {
const root = document.createElement('div')
document.body.appendChild(root)
const App = (
)
ReactDOM.render(App, root)
}
```
## Getting Started
Download [an example](https://github.com/segmentio/chrome-sidebar/tree/master/examples/) or [clone the repo](https://github.com/segmentio/chrome-sidebar):
```bash
curl https://codeload.github.com/segmentio/chrome-sidebar/tar.gz/master | tar -xz --strip=2 chrome-sidebar-master/examples/github-trending
cd github-trending
```
Install it and run:
```bash
npm install
npm run dev
```
For development, you need to load it as an unpacked extension:

Now, you should have a chrome sidebar extension on all of your pages!
## Production
In order to share your extension with others, [publish to the Chrome Web Store](https://developer.chrome.com/webstore/publish). You can keep the extension unlisted (no one can search for it) or [private](https://support.google.com/chrome/a/answer/2663860?hl=en) (people have to be added to a Google group to see it).
Learn more about [Chrome's manifest.json](https://developer.chrome.com/extensions/manifest)
## License (MIT)
```
WWWWWW||WWWWWW
W W W||W W W
||
( OO )__________
/ | \
/o o| MIT \
\___/||_||__||_|| *
|| || || ||
_||_|| _||_||
(__|__|(__|__|
```
Copyright (c) 2017-present Segment.io, Inc. open@segment.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.