Browse Source

#163 - Atlantis prod url fix #3

Elena Cristina Raffay Iglesias 1 year ago
parent
commit
6bb621d692
1 changed files with 6 additions and 2 deletions
  1. 6 2
      apps/atlantis/index.html

+ 6 - 2
apps/atlantis/index.html

@@ -16,12 +16,16 @@
16 16
       baseUri = qs.split('?linkingUri=')[1];
17 17
       baseUri = baseUri.split('/+')[0];
18 18
     }
19
+
19 20
     // Update the link urls
20 21
     for (var i = 0; i < links.length; ++i) {
21 22
       if(!baseUri.includes("?")){
22
-        links[i].href = links[i].href.replace('exp://REPLACE_ME', "?" + baseUri);
23
+        const qMark = "?";
24
+        const uri = baseUri.concat(qMark);
25
+        links[i].href = links[i].href.replace('exp://REPLACE_ME', uri);
26
+      } else {
27
+        links[i].href = links[i].href.replace('exp://REPLACE_ME', baseUri);
23 28
       }
24
-      links[i].href = links[i].href.replace('exp://REPLACE_ME', baseUri);
25 29
     }
26 30
     var redirectInterval = setInterval(function() {
27 31
       var countdown = document.querySelector('.countdown');