Skip to content

Instantly share code, notes, and snippets.

@kidGodzilla
Created February 8, 2023 03:54
Show Gist options
  • Save kidGodzilla/86d2ec17fad432b5d7e8d70bf8e4f768 to your computer and use it in GitHub Desktop.
Save kidGodzilla/86d2ec17fad432b5d7e8d70bf8e4f768 to your computer and use it in GitHub Desktop.
List cookies for current domain
var cookies = await cookieStore.getAll();
for (var i in cookies) {
var c = cookies[i];
if (c.domain === location.host || c.domain === location.host.replace('www.', '') || c.domain === location.host.replace('www', '')) {
console.log(c.name);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment