]> git.ardis.lu - static-encrypt/commitdiff
Prevent form submission on download
authorArdis Lu <ardisglu@gmail.com>
Thu, 23 Feb 2023 04:50:28 +0000 (20:50 -0800)
committerArdis Lu <ardisglu@gmail.com>
Thu, 23 Feb 2023 04:50:28 +0000 (20:50 -0800)
index.html

index 9179ff91d11abdedf8d2fa568b10e636aae7012b..d784477dded3be798896be9be9892090b27acf08 100644 (file)
     });
 
     document.querySelector('#download').addEventListener('click', e => {
+      e.preventDefault();
       const encrypted = document.querySelector('#ciphertext').textContent;
       const scriptInjection = `<script>const content = '${encrypted}'; ${decrypt.toString()}<\/script>`;
       const output = template.replace('<div>SCRIPT INJECTION</div>', scriptInjection);
This page took 0.036215 seconds and 4 git commands to generate.