fix Firefox-ism: s/const/var/
add missing grants