Last active
May 18, 2017 14:52
-
-
Save iambriansreed/dacd7d6ca53ba81ef3592b62e139b4e1 to your computer and use it in GitHub Desktop.
Clear All Cookies - a Backtick Cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cookies = document.cookie.split(";"); | |
for (var i = 0; i < cookies.length; i++) { | |
var cookie = cookies[i]; | |
var eqPos = cookie.indexOf("="); | |
var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie; | |
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Clear All Cookies", | |
"description": "Clear all browser cookies for current page.", | |
"icon": "http://clipartix.com/wp-content/uploads/2016/04/Cookie-free-images-at-vector-clip-art-image.gif", | |
"link": "https://gist.github.com/iambriansreed/dacd7d6ca53ba81ef3592b62e139b4e1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment