I used to have this on my website working just fine. Today, I noticed that it's repeatedly refreshing the page forever (infinite loop). It's supposed to refresh a certain web page only once, and only when the user clicks on the received notification.
OneSignal.push(["addListenerForNotificationOpened", function(data) { console.log("Received NotificationOpened:", data); if(location.href.substr(location.href.lastIndexOf("/")+1).startsWith("read.php")){ window.location.href = window.location.href ; } }]);