Fixed all errors in registerServiceWorker.js
Fixed all errors in registerServiceWorker.js

The only problem left in the registerServiceWorker.js file is with the Security issue in the regex.
This can not be fixed unless we use a separate way to check the host instead of using Regex.
lazyc97/pullrequests,lazyc97/pullrequests