replaced deprecated calls in contentScript