Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tan9/rakr-widget
Rakr Widget.
https://github.com/tan9/rakr-widget
Last synced: 6 days ago
JSON representation
Rakr Widget.
- Host: GitHub
- URL: https://github.com/tan9/rakr-widget
- Owner: tan9
- Created: 2016-05-06T08:50:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-06T06:36:45.000Z (over 8 years ago)
- Last Synced: 2024-12-09T18:44:21.868Z (14 days ago)
- Language: TypeScript
- Size: 76.2 KB
- Stars: 0
- Watchers: 10
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rakr Widget
JavaScript library which could be embedded into any web site and enabling Rakr integration.## Installation
Embed following snippet into your HTML.
```html(function(r,a,k,e,y,o,u){r['RakrWidgetObject']=y;r[y]=r[y]||function(){
(r[y].q=r[y].q||[]).push(arguments)},r[y].l=1*new Date();o=a.createElement(k),
u=a.getElementsByTagName(k)[0];o.async=1;o.src=e;u.parentNode.insertBefore(o,u)
})(window,document,'script','//cht.technology/rakr-widget.js','rakr');
// \- url to the rakr widget javascript
rakr('//localhost:3000', 'YOUR_RAKR_PROJECT_ID');
// \- rakr base url \- rakr id
// customizations
rakr('position', 'TopRight'); // Availables: TopRight, BottomRight*, BottomLeft, TopLeft
rakr('theme', 'Dark'); // Availables: Dark*, Light
rakr('content', 'Report to Rakr')
rakr('shortcut', 'ctrl+4');```
## Development
We use TypeScript and webpack to develop this widget, please have Node.js and NPM installed, and run following command in project directory to install all related stuffs:
```
npm install
```### Build
You can run following command to build distributable js in `dist` folder:
```
npm run build
```### Run Development Server
Start a webpack-dev-server and serving rakr.js in `http://localhost:8080/rakr.js`, simply type:
```
npm run dev
```and start hacking.