Last active
December 12, 2015 01:08
-
-
Save mauriciodarocha/4688721 to your computer and use it in GitHub Desktop.
Função para verificar se usuário está "logado" em loja Vtex
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
/* | |
* | |
* Função para verificar se existe usuário logado em loja Vtex | |
* | |
* Uso: | |
* if(is_logged()) { | |
* // código se está logado | |
* } else { | |
* // código se NÃO está logado | |
* } | |
* | |
*/ | |
var is_logged = function(){ | |
return /ISI.+Apelido/.test(document.cookie); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment