implementation of pushnotification.js