From 20e870fcf2da2e908a89bd4274f02ed7b97fa0a8 Mon Sep 17 00:00:00 2001 From: Rachel Roppolo Date: Fri, 3 Jan 2020 12:51:08 -0800 Subject: [PATCH] Include check for 'later' cookie within start method of tour --- app/views/application/_abraham.html.erb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/views/application/_abraham.html.erb b/app/views/application/_abraham.html.erb index ffec748..a743d5d 100644 --- a/app/views/application/_abraham.html.erb +++ b/app/views/application/_abraham.html.erb @@ -51,8 +51,14 @@ }); <% end %> - // Don't start the tour if the user dismissed it once this session - if (!Cookies.get('<%= abraham_cookie_prefix %>-<%= tour_name %>', { domain: '<%= abraham_domain %>' })) { - tour.start(); - } + tour.start = function (start) { + return function () { + // Don't start the tour if the user dismissed it once this session + if (!Cookies.get('<%= abraham_cookie_prefix %>-<%= tour_name %>', {domain: '<%= abraham_domain %>'})) { + start(); + } + } + }(tour.start) + + tour.start()