Updating main JS to not run if not on the index page
Updating main JS to not run if not on the index page

This is to get the karma tests in a position where they can be written

sax1johno/regexper-static,javallone/regexper-static,sunao0626/regexper-static,andrewhead/regexper-static,sax1johno/regexper-static,javallone/regexper-static,stof/regexper-static,freddiecoleman/regexper-static,andrewhead/regexper-static,sax1johno/regexper-static,andrewhead/regexper-static,freddiecoleman/regexper-static,ThibWeb/regexper-static,sunao0626/regexper-static,angrilove/regexper-static,stof/regexper-static,stof/regexper-static,angrilove/regexper-static,freddiecoleman/regexper-static,sunao0626/regexper-static,ThibWeb/regexper-static,angrilove/regexper-static