Skip to content

Commit

Permalink
Minor changes for next release.
Browse files Browse the repository at this point in the history
  • Loading branch information
aghorler committed Mar 6, 2017
1 parent c01c6cf commit 34bdfd2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
4 changes: 3 additions & 1 deletion html/options.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>Cookie Manager</title>
<title>Startup Cookie Manager</title>
</head>
<body>
<p id="conf-warning" style="color: red; text-align: center;">Startup Cookie Manager will not function until you apply these settings.</p>

<h3>Cookie whitelist (include subdomains)</h3>

<p>
Expand Down
2 changes: 1 addition & 1 deletion js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function removeCookie(cookie){

function clearSiteData(){
chrome.storage.local.get('configured', function(check){
if(check.configured == true){
if(check.configured){
chrome.cookies.getAll({}, function(allCookies){
for(var i = 0; i < allCookies.length; i++){
removeCookie(allCookies[i]);
Expand Down
8 changes: 6 additions & 2 deletions js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function saveOptions(){
domainOnlyWhitelist: domainOnlyArray,
clearCache: cacheOption,
clearHistory: historyOption,
//maybe
configured: true
}, function(){
var status = document.getElementById('status');
Expand All @@ -28,12 +27,17 @@ function restoreOptions(){
subdomainWhitelist: [],
domainOnlyWhitelist: [],
clearCache: false,
clearHistory: false
clearHistory: false,
configured: false
}, function(items){
document.getElementById('subdomain-whitelist').value = items.subdomainWhitelist.join("\n");
document.getElementById('domain-only-whitelist').value = items.domainOnlyWhitelist.join("\n");
document.getElementById('cache_option').checked = items.clearCache;
document.getElementById('history_option').checked = items.clearHistory;

if(items.configured){
document.getElementById("conf-warning").style.display = 'none';
}
});
}

Expand Down
10 changes: 5 additions & 5 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Startup Cookie Destroyer",
"version": "1.0.2",
"manifest_version": 2,
"description": "Remove unwanted cookies and site data on startup.",
"description": "Remove unwanted cookies and site data on startup, and manually from the toolbar.",
"background": {
"scripts": ["/js/background.js"],
"persistent": false
Expand All @@ -14,10 +14,10 @@
"name": "Clear cookies and site data."
},
"options_ui": {
"page": "/html/options.html",
"chrome_style": true,
"open_in_tab": false
},
"page": "/html/options.html",
"chrome_style": true,
"open_in_tab": false
},
"permissions": [
"browsingData",
"storage",
Expand Down

0 comments on commit 34bdfd2

Please sign in to comment.