Is there an ajaxify page-change event similar to beforeunload


  • Hi,
    I am looking to do some work just before the page changes.
    Using beforeunload works but only if the URL is different than the forum URL.

    window.addEventListener('beforeunload', unloadPage);
    		function unloadPage(e) {
    			// Cancel the event
    			e.preventDefault();
    			// Chrome requires returnValue to be set
    			e.returnValue = '';
    		}
    

    Is there any action:ajaxify event I may use for this purpose?

    Thanks in advance!
    JJ.

  • NodeBB Admin

    action:ajaxify.start ?


  • Yes @baris that's it, works perfectly 🙂
    Thank you so much!

Suggested Topics

  • 1
  • 3
  • 1
  • 3
  • 1
| |