Modernizing inline script tags for templates & JS API

Support for these inline script tags has now been removed in the latest version of Discourse

https://github.com/discourse/discourse/pull/38856