Skip to content

Instantly share code, notes, and snippets.

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 helloromero/d97a74c279fcbec8acaf4de3ecdd1eec to your computer and use it in GitHub Desktop.
Save helloromero/d97a74c279fcbec8acaf4de3ecdd1eec to your computer and use it in GitHub Desktop.
Hide collect.chat after submitted (requieres js-cookie)
$(function() {
var collect_chat_completed = Cookies.get('collect_chat_completed');
if (collect_chat_completed == "true" && !Cookies.get('collect_chat_timer')) {
Cookies.set('collect_chat_timer', 'true', { expires: 1 });
Cookies.set('collect_chat_completed', 'true', { expires: 1 });
Cookies.set('collect_chat_closed', 'true', { expires: 1 });
}
if (Cookies.get('collect_chat_completed') == "true") {
$('#collect-chat-launcher').hide();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment