code shared between various browser extensions