]> git.ardis.lu - static-encrypt/commitdiff
Move blocking template load to bottom
authorArdis Lu <ardisglu@gmail.com>
Thu, 23 Feb 2023 03:56:41 +0000 (19:56 -0800)
committerArdis Lu <ardisglu@gmail.com>
Thu, 23 Feb 2023 03:56:41 +0000 (19:56 -0800)
index.html

index 423a7e89246394142075923cf3415721f33ba519..35caf7c562cfa2432861c8582c594e54d712f9fc 100644 (file)
       a.click();
     }
 
-    const template = await fetch('/template.html').then(r => r.text());
     document.querySelector('form').addEventListener('submit', async e => {
       e.preventDefault();
 
       const output = template.replace('<div>SCRIPT INJECTION</div>', scriptInjection);
       downloadHtml(output, `${Date.now()}.html`);
     })
+
+    const template = await fetch('/template.html').then(r => r.text());
   </script>
 </body>
 
This page took 0.037458 seconds and 4 git commands to generate.