DEV.to link: https://dev.to/carlyraejepsenstan/a-one-click-cookie-deleter-3mfa
Are you sick of clearing your cookies and getting logged out of literally everything? Use this code snippet instead!
javascript:(()=>{let a=document.cookie.split(";");let b=a.map(x=>x.split("="));let c=b.map(x=>x[0]);for(let i=0;i<c.length;i++){document.cookie=c[i]+"=; max-age=-100"}})();
How to use:
- Visit a random site and add it as a bookmark.
- Control-click, right-click, tap with two fingers, whatever… click “edit” and paste the above code into the “Address” box.
2a. NOTE! Some browsers automatically strip thejavascript:
part from the beginning. Check to make sure that the bookmarklet address starts withjavascript:
. If it doesn’t, this won’t work. - Visit some site (like Glitch) and click on the bookmarklet. Poof! No more cookies.
(You might get logged out).
A screenshot for evidence: