jQuerize only when necessary
Delete unused updateBadge variable in localStorage
Improve readability of badge.js