Skip to content

Instantly share code, notes, and snippets.

@grahamg
Forked from chamlis/dump_cookies.js
Created February 23, 2025 21:35
Show Gist options
  • Save grahamg/98fa80e49fc47ebeb223114d36a4dfb6 to your computer and use it in GitHub Desktop.
Save grahamg/98fa80e49fc47ebeb223114d36a4dfb6 to your computer and use it in GitHub Desktop.
(function(){
let text = document.createElement("textarea");
text.value = "# Netscape HTTP Cookie File\n" + document.cookie.split("; ").map(c => c.split("=")).map(c => [document.domain, "FALSE", "/", "TRUE", "0", c[0], c[1]].join("\t")).join("\n") + "\n";
text.style.position = "absolute";
text.style.zIndex = "9999999";
document.body.prepend(text);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment