Instead of:
<script>document.currentScript.replaceWith(new Date().getFullYear())</script>
How about: <svg onload="this.outerHTML=new Date().getFullYear()"/>
Not as pretty, and you'd have to escape all the quotes, but still pretty usable.