Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt a confirmation before clearing all cookies done #7

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
3. Set cookies for any domain.

> It also displays the total number of cookies present in your browser at the top.

[![Live Demo, not Lie](https://forthebadge.com/images/badges/its-not-a-lie-if-you-believe-it.svg)](https://github.com/vinitshahdeo/Cookie-Manager/)

> Check the screenshots of UI [here](https://github.com/vinitshahdeo/Cookie-Manager/tree/master/assets)

![Screenshot](https://github.com/vinitshahdeo/Cookie-Manager/blob/master/assets/Screenshot%202019-01-17%20at%2010.57.41%20PM.png?raw=true)
Expand All @@ -33,6 +36,8 @@ Note - **Icon is taken from [here](https://pngtree.com/free-icon/clean_419342)**
- [How to install a Chrome extension without using the Chrome Web Store](https://blog.hunter.io/how-to-install-a-chrome-extension-without-using-the-chrome-web-store-31902c780034)
- Read about **HTTP Cookies** [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies).

>#### Are you looking for something that can clear all your cookies in one go? Check [this](https://vinitshahdeo.github.io/cookie-cleaner/)!

### To Do

- [x] Setting cookies for given domain
Expand All @@ -45,6 +50,12 @@ Note - **Icon is taken from [here](https://pngtree.com/free-icon/clean_419342)**

- [ ] Refactoring of code

### Wanna contribute?

[![Fork this on GitHub](https://img.shields.io/badge/Click to Fork-This repository-orange.svg?style=for-the-badge)](https://github.com/vinitshahdeo/Cookie-Manager/fork)

If you want to contribute to this project and make it better, your help is most welcome. Fork it and make changes in your personal branch and send **pull request** to `develop`


### Thanks!

Expand Down
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
title: Cookie Manager
show_downloads: true
theme: jekyll-theme-hacker
6 changes: 4 additions & 2 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,17 @@ function onCookieChanged(){
onCookieChanged();

function clearAllCookies(){
console.log("cookies cleared");
chrome.cookies.getAll({}, function(cookies) {
if(confirm("Are you sure you want to delete All cookies ?")){
console.log("cookies cleared");
chrome.cookies.getAll({}, function(cookies) {
for (var i in cookies) {
removeCookie(cookies[i]);
}
});
document.getElementById("banner").className="alert alert-danger alert-dismissible";
document.getElementById("message").innerHTML = "All Cookies are cleared!";
setCookieCount();
}
}

function removeCookie(cookie) {
Expand Down
62 changes: 62 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Cookie Manager
#### A chrome extension to manage browser cookies manually.

[![Cookie Manager](https://img.shields.io/badge/Cookie-Manager-teal.svg?colorA=red&colorB=blue)](https://github.com/vinitshahdeo/Cookie-Manager) [![Chrome Extesion](https://img.shields.io/badge/Chrome-Extension-teal.svg)](https://github.com/vinitshahdeo/Cookie-Manager)

### What you can do with this extension?

1. Display cookies for given **url**
2. Delete all cookies present in the browser
3. Set cookies for any domain.

> It also displays the total number of cookies present in your browser at the top.

[![Live Demo, not Lie](https://forthebadge.com/images/badges/its-not-a-lie-if-you-believe-it.svg)](https://github.com/vinitshahdeo/Cookie-Manager/)

> Check the screenshots of UI [here](https://github.com/vinitshahdeo/Cookie-Manager/tree/master/assets)

![Screenshot](https://github.com/vinitshahdeo/Cookie-Manager/blob/master/assets/Screenshot%202019-01-17%20at%2010.57.41%20PM.png?raw=true)

### Installation

**Steps to install this extension manually :**

- Clone this repository using `git clone https://github.com/vinitshahdeo/Cookie-Manager`

- Go to `chrome://extensions/` and check the box for Developer mode in the top right.

- Click the `load unpacked` button and select the cloned folder for this repo to install it.

- And here, you go!

Note - **Icon is taken from [here](https://pngtree.com/free-icon/clean_419342)**.

### Useful Links

- [How to install a Chrome extension without using the Chrome Web Store](https://blog.hunter.io/how-to-install-a-chrome-extension-without-using-the-chrome-web-store-31902c780034)
- Read about **HTTP Cookies** [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies).

>#### Are you looking for something that can clear all your cookies in one go? Check [this](https://vinitshahdeo.github.io/cookie-cleaner/)!

### To Do

- [x] Setting cookies for given domain

- [ ] Display cookies based on the filter i.e. regex(say *.github.com)

- [ ] Delete cookies individually for the domain

- [ ] Prompt a confirmation for **`Clear All Cookies`**

- [ ] Refactoring of code

### Wanna contribute?

[![Fork this on GitHub](https://img.shields.io/badge/Click to Fork-This repository-orange.svg?style=for-the-badge)](https://github.com/vinitshahdeo/Cookie-Manager/fork)

If you want to contribute to this project and make it better, your help is most welcome. Fork it and make changes in your personal branch and send **pull request** to `develop`


### Thanks!

[![Author](https://img.shields.io/badge/[email protected]?colorA=gray&colorB=dodgerblue)](https://github.com/vinitshahdeo/)
4 changes: 4 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
theme: jekyll-theme-minimal
title: Cookie Manager
show_downloads : true
logo: [email protected]
Binary file added docs/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.