2 lines
1.6 KiB
JavaScript
2 lines
1.6 KiB
JavaScript
/*! This file is auto-generated */
|
|
!function(h){var s;function i(){h(window).off("beforeunload.wp-auth-check"),"undefined"==typeof adminpage||"post-php"!==adminpage&&"post-new-php"!==adminpage||"undefined"==typeof wp||!wp.heartbeat||(h(document).off("heartbeat-tick.wp-auth-check"),wp.heartbeat.connectNow()),s.fadeOut(200,function(){s.addClass("hidden").css("display",""),h("#wp-auth-check-frame").remove(),h("body").removeClass("modal-open")})}h(document).on("heartbeat-tick.wp-auth-check",function(e,a){"wp-auth-check"in a&&(!a["wp-auth-check"]&&s.hasClass("hidden")?function(){var e,t=h("#wp-auth-check"),n=h("#wp-auth-check-form"),o=s.find(".wp-auth-fallback-expired"),c=!1;n.length&&(h(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.")}),(e=h('<iframe id="wp-auth-check-frame" frameborder="0">').attr("title",o.text())).on("load",function(){var e,a;c=!0,n.removeClass("loading");try{e=(a=h(this).contents().find("body")).height()}catch(e){return s.addClass("fallback"),t.css("max-height",""),n.remove(),void o.focus()}e?a&&a.hasClass("interim-login-success")?i():t.css("max-height",e+40+"px"):a&&a.length||(s.addClass("fallback"),t.css("max-height",""),n.remove(),o.focus())}).attr("src",n.data("src")),n.append(e)),h("body").addClass("modal-open"),s.removeClass("hidden"),e?(e.focus(),setTimeout(function(){c||(s.addClass("fallback"),n.remove(),o.focus())},1e4)):o.focus()}():a["wp-auth-check"]&&!s.hasClass("hidden")&&i())}).ready(function(){(s=h("#wp-auth-check-wrap")).find(".wp-auth-check-close").on("click",function(){i()})})}(jQuery); |