3 ms·
For the lazy, here's the magic: <script> document.currentScript.remove(); setTimeout(function() { // no rights reserved (BSD0) by Jeremy Banks
by core-questions 9y ago
For the lazy, here's the magic:
<script>
document.currentScript.remove();
setTimeout(function() {
// no rights reserved (BSD0) by Jeremy Banks <_@jeremy.ca>
const html = document.documentElement.outerHTML;
document.open('text/plain');
document.write('view source disabled');
document.close();
document.documentElement.innerHTML = html;
});
</script>