Remove scripts

Is it possible to remove all scripts right after inserting HTML by document.write, instead of doing it inside the DOMContentLoaded event?

Hackers may cancel the DOMContentLoaded event so, removing script tags in the DOMContentLoaded event only is not a reliable method.

You need to remove the script tags right after inserting HTML by document.write. But it may not delete all script tags, so you need to remove one more time in the DOMContentLoaded event.

Tested On: Chrome, FireFox, Safari