forked from bertrandom/chrome-cookies-secure
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exposing conversion functions so further processing can be done befor…
…e serialising
- Loading branch information
Tom Edge
committed
May 6, 2016
1 parent
4333540
commit 6a6b9a2
Showing
3 changed files
with
51 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
var chrome = require('./index'); | ||
|
||
function deleteByName(cookie, name, index, array) { | ||
if (name === cookie.name) { | ||
array.splice(index, 1); | ||
} | ||
} | ||
|
||
//console.log(process.argv) | ||
chrome.getCookies(process.argv[2], process.argv[3], 'raw', function(err, cookies) { | ||
//console.log(cookies); | ||
cookies.forEach(function (entry, index, array) { | ||
deleteByName(entry, '_mkto_trk', index, array); | ||
}); | ||
console.log("Cookie:" + chrome.convertRawToHeader(cookies)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters