Skip to content

Instantly share code, notes, and snippets.

@hiun
Created April 19, 2014 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiun/11092336 to your computer and use it in GitHub Desktop.
Save hiun/11092336 to your computer and use it in GitHub Desktop.
Extract Cookie with JavaScript
function layout () {
var cookies = document.cookie.split(";");
for (i = 1; i < cookies.length; i++) {
var value = cookies[i];
value = value.split("=");
if (value[0] === "layout" && value[1] === false) {
return false;
} else {
return true;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment