Browse Source

#163 - Refactor Atlantis prod url fix #3

Elena Cristina Raffay Iglesias 1 year ago
parent
commit
f5bca8b03b
1 changed files with 3 additions and 7 deletions
  1. 3 7
      apps/atlantis/index.html

+ 3 - 7
apps/atlantis/index.html

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