The easy way is to put all the JavaScript your site will need in MediaWiki:Common.js (only editable by sysops). The hard way would be creating an extension to allow <script>, checking only sysops add them, normal edits keep it as it was...