From d8596345be769876fb71377bdaf992efaa03de96 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Wed, 22 Mar 2017 16:04:09 +0100 Subject: [PATCH] Change message after first visit, closes #22 --- index.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index deb4ea2..130a0cf 100644 --- a/index.html +++ b/index.html @@ -50,9 +50,19 @@ function colored(col, str) { return "[[;#" + col + ";]" + str + "]"; } + + var visitedBefore = localStorage.getItem("visitedBefore") === "yes"; + var greeting = ""; + if (!visitedBefore) { + greeting = colored("75715E", "Welcome to insect. Type '?' if this is your first visit."); + localStorage.setItem("visitedBefore", "yes"); + } else { + greeting = colored("75715E", "Welcome to insect. Enter '?' for help."); + } + $(document).ready(function() { $('#terminal').terminal(interpret, { - greetings: colored("75715E", "Welcome to insect. Type '?' if this is your first visit."), + greetings: greeting, name: "terminal", height: 550, prompt: bold("> "),