add check to verify that popup js library has loaded