Skip to content

Commit

Permalink
Update for v2.0.0
Browse files Browse the repository at this point in the history
- Adding setChromeStorage function to cookies.js
  • Loading branch information
jrie committed Jan 7, 2018
1 parent c559fd8 commit 018420d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,25 @@ function checkChromeHadNoErrors () {
}

void chrome.runtime.lastError

return false
}

return true
}

function setChromeStorage (data) {
chrome.storage.local.set(data, function () {
if (checkChromeHadNoErrors()) {
if (hasConsole) {
console.log('Browser updated the storage data.')
}
} else if (hasConsole) {
console.log('Browser updating storage error.')
}
})
}

// Chrome
function chromeGetStorageAndClearCookies (action, data, cookies, domainURL, doLoadURLCookies) {
if (data === null) {
Expand Down

0 comments on commit 018420d

Please sign in to comment.