popup script for firefox and chrome