Skip to content

Instantly share code, notes, and snippets.

@pk11
Created December 9, 2009 15:51
Show Gist options
  • Save pk11/252551 to your computer and use it in GitHub Desktop.
Save pk11/252551 to your computer and use it in GitHub Desktop.
// show cookies for current site - bookmarklet
javascript:(function(){x=window.open();x.document.write('%3Cht'+'ml%3E/r%3Che'+'ad%3E%3Ctitle%3EDisplay%20Cookies%3C/title%3E%3C/he'+'ad%3E%3Cbo'+'dy%3E');if%20(document.cookie%20==%20'')%20x.document.write('No%20Cookies%20Found');%20else%20{thisCookie%20=%20document.cookie.split(';%20');%20for%20(i=0;%20i%3CthisCookie.length;%20i++)%20{x.document.write(thisCookie[i]%20+%20'%3Cbr%20//%3E');}}x.document.write('%3C/bo'+'dy%3E%3C/ht'+'ml%3E');x.document.close();})()
//delete cookies for current site - bookmarklet
javascript:(function(){C=document.cookie.split("; ");for(d="."+location.host;d;d=(""+d).substr(1).match(/\..*$/))for(sl=0;sl<2;++sl)for(p="/"+location.pathname;p;p=p.substring(0,p.lastIndexOf('/')))for(i in C)if(c=C[i]){document.cookie=c+"; domain="+d.slice(sl)+"; path="+p.slice(1)+"/"+"; expires="+new Date((new Date).getTime()-1e11).toGMTString()}})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment