diff --git a/src/js/_enqueues/lib/auth-check.js b/src/js/_enqueues/lib/auth-check.js index be2a37cfc0..c5d3af18af 100644 --- a/src/js/_enqueues/lib/auth-check.js +++ b/src/js/_enqueues/lib/auth-check.js @@ -5,8 +5,10 @@ */ /* global adminpage */ -(function($){ - var wrap; +( function( $ ) { + var wrap, + tempHidden, + tempHiddenTimeout; /** * Shows the authentication form popup. @@ -15,18 +17,18 @@ * @private */ function show() { - var parent = $('#wp-auth-check'), - form = $('#wp-auth-check-form'), - noframe = wrap.find('.wp-auth-fallback-expired'), + var parent = $( '#wp-auth-check' ), + form = $( '#wp-auth-check-form' ), + noframe = wrap.find( '.wp-auth-fallback-expired' ), frame, loaded = false; if ( form.length ) { // Add unload confirmation to counter (frame-busting) JS redirects. - $(window).on( 'beforeunload.wp-auth-check', function(e) { - e.originalEvent.returnValue = wp.i18n.__( 'Your session has expired. You can log in again from this page or go to the login page.' ); + $( window ).on( 'beforeunload.wp-auth-check', function( event ) { + event.originalEvent.returnValue = window.wp.i18n.__( 'Your session has expired. You can log in again from this page or go to the login page.' ); }); - frame = $('