Modify main.html:error in script tag