Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. (function ($) {
  2. var locationInterval,
  3. previousLocation;
  4.  
  5. window.calendarSubmittedInWindow = function (externalWindow) {
  6. if (locationInterval) {
  7. clearInterval(locationInterval);
  8. locationInterval = undefined;
  9. }
  10.  
  11. locationInterval = setInterval(function () {
  12. if (previousLocation !== undefined && previousLocation !== externalWindow.location.href) {
  13. clearInterval(locationInterval);
  14. window.location.href = externalWindow.location.href;
  15. return;
  16. }
  17. previousLocation = externalWindow.location.href;
  18. }, 1);
  19. };
  20.  
  21. })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement