index.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Helios IDE</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  6. <meta name="author" content="Nicolas Petton"/>
  7. <link type="image/x-icon" rel="shortcut icon" href="/favicon.ico"/>
  8. </head>
  9. <body id="helios">
  10. <div id="helper">Loading Helios...</div>
  11. <div id="includes">
  12. <script type='text/javascript'>
  13. // TODO remove, deprecated
  14. var global = typeof global === "undefined" ? window : global || window;
  15. var globalThis = typeof globalThis === "undefined" ? window : globalThis || window;
  16. var base = decodeURIComponent(window.location.hash.slice(1)).replace(/\/$/, "");
  17. var script = document.createElement("script");
  18. script.src = base + "/config.js";
  19. document.getElementsByTagName("head")[0].appendChild(script);
  20. var __interval = setInterval(function () {
  21. if (typeof require !== "undefined") {
  22. clearInterval(__interval);
  23. require.baseUrl = base;
  24. require.callback = function () {
  25. require(["helios/polyfills"], function () {
  26. require(["helios/app", "amber/core/Platform-Browser"], function (amber) {
  27. var options;
  28. if (window.opener) {
  29. // Slave: use master's settings
  30. amber.globals.SmalltalkSettings = window.opener.require('amber/helpers').globals.SmalltalkSettings;
  31. } else {
  32. // Standalone: set default amd namespace
  33. options = {'transport.defaultAmdNamespace': "helios"};
  34. }
  35. amber.initialize(options).then(function () {
  36. amber.globals.HLManager._setup();
  37. });
  38. });
  39. });
  40. };
  41. script = document.createElement("script");
  42. script.src = base + "/" + require.paths.requireJS + ".js";
  43. document.getElementsByTagName("head")[0].appendChild(script);
  44. }
  45. }, 200);
  46. </script>
  47. </div>
  48. </body>
  49. </html>