| 
1 |  | -<!DOCTYPE html>  | 
 | 1 | +<!doctype html>  | 
2 | 2 | <html lang="en">  | 
3 | 3 | 
 
  | 
4 | 4 | <head>  | 
 | 
9 | 9 |   <meta name="theme-color" content="#000000" />  | 
10 | 10 |   <meta name="description" content="H2O Wave App" />  | 
11 | 11 |   <link rel="manifest" href="manifest.json" crossorigin="use-credentials" />  | 
12 |  | -  <link href="/assets/inter.css" rel="stylesheet">  | 
 | 12 | +  <link href="/assets/inter.css" rel="stylesheet" />  | 
13 | 13 |   <title>H2O Wave</title>  | 
14 | 14 | </head>  | 
15 | 15 | 
 
  | 
16 | 16 | <body>  | 
17 | 17 |   <noscript>You need to enable JavaScript to run this app.</noscript>  | 
18 | 18 |   <div id="wave-root"></div>  | 
19 |  | -  <!--  | 
20 |  | -      This HTML file is a template.  | 
21 |  | -      If you open it directly in the browser, you will see an empty page.  | 
22 |  | -
  | 
23 |  | -      You can add webfonts, meta tags, or analytics to this file.  | 
24 |  | -      The build step will place the bundled scripts into the <body> tag.  | 
25 |  | -
  | 
26 |  | -      To begin the development, run `npm start` or `yarn start`.  | 
27 |  | -      To create a production bundle, use `npm run build` or `yarn build`.  | 
28 |  | -    -->  | 
 | 19 | +  <!-- Ensure this JS runs absolutely first to avoid race conditions. -->  | 
 | 20 | +  <script>  | 
 | 21 | +    const nonce = document.body.dataset.nonce  | 
 | 22 | +    const originalInsertBefore = Element.prototype.insertBefore  | 
 | 23 | +    const originalAppendChild = Element.prototype.appendChild  | 
 | 24 | +    window.CSPSettings = { nonce }  | 
 | 25 | +    Element.prototype.insertBefore = function (newNode, referenceNode) {  | 
 | 26 | +      if (nonce && newNode.nodeType === 1 && newNode.hasAttribute("data-merge-styles")) {  | 
 | 27 | +        newNode.setAttribute("nonce", nonce)  | 
 | 28 | +      }  | 
 | 29 | +      return originalInsertBefore.call(this, newNode, referenceNode)  | 
 | 30 | +    }  | 
 | 31 | +    Element.prototype.appendChild = function (newNode) {  | 
 | 32 | +      if (nonce && newNode.nodeType === 1 && newNode.nodeName === 'SCRIPT' || newNode.nodeName === 'STYLE') {  | 
 | 33 | +        newNode.setAttribute("nonce", nonce)  | 
 | 34 | +      }  | 
 | 35 | +      return originalAppendChild.call(this, newNode)  | 
 | 36 | +    };  | 
 | 37 | +  </script>  | 
29 | 38 |   <script type="module" src="/src/index.tsx"></script>  | 
30 | 39 | </body>  | 
31 | 40 | 
 
  | 
 | 
0 commit comments