<commit_before><script type="text/javascript">
<% if @progress[:next_task] == :confirm_email %>
  var tour = new Tour({ labels: { end: "Dismiss" } });
  tour.addSteps([{
    element: "#fat-menu",
    title: "Confirm your email address",
    content: "If you didn't get our confirmation email, you can re-send it from the settings page.",
    placement: "bottom",
  }]);

  tour.start(true);

  $("#fat-menu").click(function() {
    tour.end();
  });

<% elsif @progress[:next_task] == :cloud_storage %>
  var tour = new Tour({ labels: { end: "Dismiss" } });
  tour.addSteps([{
    element: "#fat-menu",
    title: "Add a storage service",
    content: "Go to the settings page to connect TeacherMaps to your Dropbox or Google Drive account.",
    placement: "bottom",
  }]);

  tour.start(true);

  $("#fat-menu").click(function() {
    tour.end();
  });

<% elsif @progress[:next_task] == :create_map %>
  var tour = new Tour({ labels: { end: "Dismiss" } });
  tour.addSteps([{
    element: "#users_create_map",
    title: "Get started!",
    content: "Click here to create your first map",
    placement: "bottom",
  }]);

  tour.start(true);

  $("#users_create_map").click(function() {
    tour.end();
  });

<% end %>
</script><commit_msg>initialization and start of tours is standardized, tours don't continue after user dismisses.<commit_after><script type="text/javascript">
var tour = new Tour({ labels: { end: "Dismiss" } });

<% if @progress[:next_task] == :confirm_email %>
  tour.addSteps([{
    element: "#fat-menu",
    title: "Confirm your email address",
    content: "If you didn't get our confirmation email, you can re-send it from the settings page.",
    placement: "bottom",
  }]);

  $("#fat-menu").click(function() {
    tour.end();
  });

<% elsif @progress[:next_task] == :cloud_storage %>
  tour.addSteps([{
    element: "#fat-menu",
    title: "Add a storage service",
    content: "Go to the settings page to connect TeacherMaps to your Dropbox or Google Drive account.",
    placement: "bottom",
  }]);

  $("#fat-menu").click(function() {
    tour.end();
  });

<% elsif @progress[:next_task] == :create_map %>
  tour.addSteps([{
    element: "#users_create_map",
    title: "Get started!",
    content: "Click here to create your first map",
    placement: "bottom",
  }]);

  $("#users_create_map").click(function() {
    tour.end();
  });

<% end %>

tour.start();
</script>
{'fraction_non_alphanumeric': 0.1838937318389373, 'fraction_numerical': 0.0, 'mean_word_length': 3.716242661448141, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4805033', 'n_tokens_mistral': 804, 'n_tokens_neox': 773, 'n_words': 217}