From 53162e1181faaeb22e08495e8458aebdee9d4c1c Mon Sep 17 00:00:00 2001
From: Daniel <daniel@harvey>
Date: Tue, 31 Mar 2020 14:30:21 +0200
Subject: [PATCH] ENH: tour.init() has refresh argument now.

---
 misc/yaml_to_json.py | 3 ++-
 src/core/js/tour.js  | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/misc/yaml_to_json.py b/misc/yaml_to_json.py
index 1a7961a0..a7d5bd62 100755
--- a/misc/yaml_to_json.py
+++ b/misc/yaml_to_json.py
@@ -1,8 +1,9 @@
 #!/usr/bin/env python3
 
 import sys
-import yaml
 import json
 
+import yaml
+
 with open(sys.argv[1], 'r') as infile:
     print(json.dumps(yaml.load(infile)))
diff --git a/src/core/js/tour.js b/src/core/js/tour.js
index d798eb55..904677f2 100644
--- a/src/core/js/tour.js
+++ b/src/core/js/tour.js
@@ -691,9 +691,12 @@ var tour = new function() {
     /**
      * Initialize the tour.
      */
-    this.init = async function _in() {
+    this.init = async function _in(refresh=false) {
         try {
             tour.debug("initializing tour module");
+            if (refresh) {
+                localStorage.removeItem("tour_state");
+            }
             await tour.load_tour();
             tour.post_init();
         } catch (error) {
-- 
GitLab