move onclicked listener to bottom
use onStartup for first refresh
put dummy version to manifest
use onInstalled to refresh after installation
use alarms to refresh instead of background interval
add a script to write version into json

chrome complains if you simply have %VERSION% in the manifest so it's
necessary to always have some valid version there. the script reads and
writes a new version when publishing
use UPDATE_INTERVAL