Here your commit message doesn't seem to match your edit. Was there a reason you removed the code there? That was functional code used for the template preloads. Note: You included standard summaries in ImprotJS, but the code was in fact for something else: for custom template insertions.
Did you change anything else aside from the reformatting? I see at the very bottom you removed "customPreloadTemplates();". Are there any more removals, and why? Was the removal of "customPreloadTemplates();" accidental?
The script you removed was in fact not unused, before your edits. It was used by the code you deleted in your first edit. Also can you give me a short explanation as to in which way the tips functions were vulnerable to XSS? It all seems fine to me.
Looks like that was an error on my part. I did not see the customization that changed it from edit summaries to template preloading. My bad. I have re-added that script as well as it's dependency.
As far as the Tips, the current code does allow XSS, but it also depends on the Tips.js to have added it. Since they are both under JSRT, I suppose it would be fine to re-enable it even though it's insecure.
The other edits were due to the fact that the script was assumed to be the former insecure script used for edit summaries. Again, I have secured the script as it was and restored it. My apologies. Thanks for sending me this message rather than reverting it. Again, I am sorry to have caused you any issues.