onwebkitspeechchange=”this.form.submit();”
Is a Javascript event, not CSS. You need to update your JS file:
1. Grab search box via class or id.
2. Add event handler: onwebkitspeechchange
3. On firing event: this.form.submit();
As for your question, unfortunately I do not know where is a “safe” place to store JS code that would not be overwritten on next update.
What you can do is create a JS file with all your JS code and just link to it in the header simply using:
<script src=”myscripts.js”></script>
On next update just remember to check that line is still there.