converting from bg extension to content-script