2
0

index.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Amber Smalltalk</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  6. <meta name="author" content="Nicolas Petton"/>
  7. <script>
  8. var require = {
  9. baseUrl: "..",
  10. map: {"*": {
  11. "amber/Platform": "amber_core/Platform-Browser",
  12. "amber/compatibility": "amber/browser-compatibility"
  13. }}
  14. };
  15. </script>
  16. <script type='text/javascript' src='../node_modules/es6-promise/dist/es6-promise.js'></script>
  17. <script type='text/javascript' src='../node_modules/requirejs/require.js'></script>
  18. <script type='text/javascript' src='../config.js'></script>
  19. </head>
  20. <body>
  21. <p id="loading">Loading Amber for development ...</p>
  22. <p id="startlegacy">To start legacy in-page IDE, <a href="#" onclick="require('amber/helpers').globals.Browser._open(); return false;">click here</a>.</p>
  23. <p id="starthelios">To popup Helios IDE, <a href="#" onclick="require('amber/helpers').popupHelios(); return false;">click here</a>.</p>
  24. <script type='text/javascript'>
  25. var startLegacy = document.getElementById("startlegacy");
  26. startLegacy.parentNode.removeChild(startLegacy);
  27. var startHelios = document.getElementById("starthelios");
  28. startHelios.parentNode.removeChild(startHelios);
  29. var loadHelpers = new Promise(function (resolve, reject) {
  30. setTimeout(function () {
  31. require(["amber/legacy/IDE", "amber/web/Web", "amber/legacy/Benchfib", "helios/all", "amber_cli/AmberCli"], resolve, reject);
  32. }, 250);
  33. });
  34. require(["amber/devel"], function (amber) {
  35. loadHelpers
  36. .then(function () {
  37. return amber.initialize({'transport.defaultAmdNamespace': "amber_core"})
  38. })
  39. .then(function () {
  40. var loading = document.getElementById("loading");
  41. loading.parentNode.appendChild(startLegacy);
  42. loading.parentNode.appendChild(startHelios);
  43. loading.parentNode.removeChild(loading);
  44. });
  45. });
  46. </script>
  47. </body>
  48. </html>