index.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  6. <title>Mol* Browser Test</title>
  7. <style>
  8. * {
  9. margin: 0;
  10. padding: 0;
  11. box-sizing: border-box;
  12. }
  13. html, body {
  14. width: 100%;
  15. height: 100%;
  16. overflow: hidden;
  17. }
  18. </style>
  19. </head>
  20. <body>
  21. <div id="app"></div>
  22. <script type="text/javascript">
  23. function urlQueryParameter (id) {
  24. if (typeof window === 'undefined') return undefined
  25. const a = new RegExp(`${id}=([^&#=]*)`)
  26. const m = a.exec(window.location.search)
  27. return m ? decodeURIComponent(m[1]) : undefined
  28. }
  29. const name = urlQueryParameter('name')
  30. if (name) {
  31. const script = document.createElement('script')
  32. script.src = name + '.js'
  33. document.body.appendChild(script)
  34. }
  35. </script>
  36. <script type="text/javascript" >
  37. const script = document.createElement('script');
  38. script.src = "render-shape.js";
  39. document.body.appendChild(script);
  40. </script>
  41. </body>
  42. </html>