Skip to content

Instantly share code, notes, and snippets.

@roine
Created November 19, 2012 04:23
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 roine/4108948 to your computer and use it in GitHub Desktop.
Save roine/4108948 to your computer and use it in GitHub Desktop.
if(localStorage in window)
if(typeof localStorage.view == 'undefined') localStorage.view = 0
localStorage.view++;
maxView = 10;
if(maxView > localStorage.view){
// display a message 10 times
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment