we should eventually refactor this to a list of regexes, as we will want to support IE and safari as well.