Adding initial logic to detect scripts using XRegExp