@learnpack/learnpack 5.0.260 → 5.0.262

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -91,17 +91,34 @@
91
91
  <!-- Injected by deployment script - Resistance to caching is futile! -->
92
92
  <script>
93
93
  (function() {
94
+
95
+ const cloudFrontDomain = "d3a7w3e3g8ydll.cloudfront.net"
96
+
97
+ function getIdeVersion() {
98
+ try {
99
+ if (typeof window === 'undefined' || typeof window.location === 'undefined') return "latest";
100
+ const params = new URLSearchParams(window.location.search);
101
+ return params.get('ideVersion') === 'next' ? 'next' : 'latest';
102
+ } catch (e) {
103
+ return "latest";
104
+ }
105
+ }
106
+
107
+ const ideVersion = getIdeVersion()
108
+ const cssUrl = "https://" + cloudFrontDomain + "/learnpack/" + ideVersion + "/app.css"
109
+ const jsUrl = "https://" + cloudFrontDomain + "/learnpack/" + ideVersion + "/app.js"
110
+
94
111
  // Add CSS
95
112
  const link = document.createElement('link');
96
113
  link.rel = 'stylesheet';
97
- link.href = "https://d3a7w3e3g8ydll.cloudfront.net/learnpack/v5/app.css?v=" + Date.now();
114
+ link.href = cssUrl + "?v=" + Date.now();
98
115
  document.head.appendChild(link);
99
116
 
100
117
  // Add JavaScript
101
118
  const script = document.createElement('script');
102
119
  script.type = 'module';
103
120
  script.crossOrigin = 'anonymous';
104
- script.src = "https://d3a7w3e3g8ydll.cloudfront.net/learnpack/v5/app.js?v=" + Date.now();
121
+ script.src = jsUrl + "?v=" + Date.now();
105
122
  document.body.appendChild(script);
106
123
  })();
107
124
  </script>
package/src/ui/app.tar.gz CHANGED
Binary file