Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hstove/electron-cookies
Adds support for cookies in Electron. Cookies are persisted through localStorage.
https://github.com/hstove/electron-cookies
Last synced: 2 months ago
JSON representation
Adds support for cookies in Electron. Cookies are persisted through localStorage.
- Host: GitHub
- URL: https://github.com/hstove/electron-cookies
- Owner: hstove
- License: mit
- Created: 2015-03-27T22:26:14.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-03-17T00:01:28.000Z (almost 7 years ago)
- Last Synced: 2024-04-26T20:07:48.953Z (9 months ago)
- Language: CoffeeScript
- Homepage:
- Size: 82 KB
- Stars: 125
- Watchers: 5
- Forks: 29
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-electron-zh - cookies - Adds support for `document.cookie`. (Components / Using Electron)
README
# Important! This repository has moved.
For the currenlty maintained version, see [heap/electron-cookies](https://github.com/heap/electron-cookies).
# Electron Cookies
(Formerly called `atom-shell-cookies`)
Adds support for cookies in Electron. Cookies are persisted through localStorage.
Forked from https://gist.github.com/paulcbetts/2d2de55d137a1cf9d1ac.
## Why?
Electron's `renderer` environment doesn't come with built in support for a `document.cookie` API. Thus, if you want to use Google Analytics or another client-side analytics library, they won't work because they can't set cookies.
By using this package, you can drop client-side analytics code into your app and it will work splendidly.
## Installation
```bash
npm install electron-cookies
```## Usage
In your app's `renderer` code, just require this package:
```js
require('electron-cookies')
```## Contributing
Original code is written in `src/index.coffee`, with tests at `spec/electron_cookies_spec.coffee`. Write code in coffeescript, and run `grunt` to compile coffeescript on the fly.