Enable guided tour with CSP switched on
Change-Id: I3235a3fc45f5a28ce6eb4995fe6c767551370643
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 4f6074f..be58b60 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -84,13 +84,17 @@
};
KorAP.vc = vcClass.create(vcArray);
-
- KorAP.tourshow = function(){
- tourClass.gTstartSearch().start();
- };
-
- KorAP.tourshowR = function(){
- tourClass.gTshowResults().start();
+
+ let gt;
+ if (gt = document.getElementById('link-guided-tour')) {
+ gt.setAttribute('href', '#');
+ gt.addEventListener('click', function(){
+ tourClass.gTstartSearch().start();
+ });
+
+ KorAP.tourshowR = function(){
+ tourClass.gTshowResults().start();
+ };
};
domReady(function (event) {