Update background.js

Add onUpdated event