Upon completion of a push, optionally display a link to a survey

I'm welcome to suggestions on how to improve my javascript :p