Skip to content

Instantly share code, notes, and snippets.

@bak1an
Created April 20, 2012 10:34
Show Gist options
  • Save bak1an/2427693 to your computer and use it in GitHub Desktop.
Save bak1an/2427693 to your computer and use it in GitHub Desktop.
bookmarklet that allows quickly set cookies from http headers
javascript:if (document.location=="about:blank" || document.location=="chrome://newtab/") alert("go to target site first"); else { (function (a){var cs=a.split(';');for (var c in cs){ if (cs[c]!='') document.cookie = cs[c]+"; path=/; domain=."+document.location.host.replace(/www\./i,'')+";";}})(prompt("----------------- cookies string ---------------","name=value; name2=value2;")); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment