Ticket #31964: unload-function-replaceable.patch
File unload-function-replaceable.patch, 602 bytes (added by , 9 years ago) |
---|
-
updates.js
old new 538 538 * If an update is on-going and a user attempts to leave the page, 539 539 * open an "Are you sure?" alert. 540 540 */ 541 $( window ).on( 'beforeunload',function() {541 wp.updates.beforeunload = function() { 542 542 if ( wp.updates.updateLock ) { 543 543 return wp.updates.l10n.beforeunload; 544 544 } 545 }); 545 } 546 547 $( window ).on( 'beforeunload', wp.updates.beforeunload); 548 549 $(document).trigger( 'wp-plugin-shinyupdates-loaded' ); 546 550 547 551 })( jQuery, window.wp, window.pagenow, window.ajaxurl );