Some web hosts will auto-minify HTML and strip out comments
document.querySelector('#download').addEventListener('click', e => {
const encrypted = document.querySelector('#ciphertext').textContent;
const scriptInjection = `<script>const content = '${encrypted}'; ${decrypt.toString()}<\/script>`;
- const output = template.replace('<!-- SCRIPT INJECTION -->', scriptInjection);
+ const output = template.replace('<div>SCRIPT INJECTION</div>', scriptInjection);
downloadHtml(output, `${Date.now()}.html`);
})
</script>
</form>
</main>
- <!-- SCRIPT INJECTION -->
+ <div>SCRIPT INJECTION</div>
<script>
document.querySelector('form').addEventListener('submit', async e => {
e.preventDefault();