Skip to content

Commit

Permalink
Change message after first visit, closes #22
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed Mar 22, 2017
1 parent d2c54eb commit d859634
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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("> "),
Expand Down

0 comments on commit d859634

Please sign in to comment.