mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-26 11:08:06 +01:00
b93b409976
Props dsixinetu, adamsilverstein, azaozz. Fixes #49573. Built from https://develop.svn.wordpress.org/trunk@48337 git-svn-id: http://core.svn.wordpress.org/trunk@48106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2 lines
1.6 KiB
JavaScript
2 lines
1.6 KiB
JavaScript
/*! This file is auto-generated */
|
|
!function(i){var s,o,e;function h(){var e=window.adminpage,a=window.wp;i(window).off("beforeunload.wp-auth-check"),("post-php"===e||"post-new-php"===e)&&a&&a.heartbeat&&a.heartbeat.connectNow(),s.fadeOut(200,function(){s.addClass("hidden").css("display",""),i("#wp-auth-check-frame").remove(),i("body").removeClass("modal-open")})}i(document).on("heartbeat-tick.wp-auth-check",function(e,a){"wp-auth-check"in a&&(a["wp-auth-check"]||!s.hasClass("hidden")||o?a["wp-auth-check"]&&!s.hasClass("hidden")&&h():function(){var e,o=i("#wp-auth-check"),n=i("#wp-auth-check-form"),t=s.find(".wp-auth-fallback-expired"),c=!1;n.length&&(i(window).on("beforeunload.wp-auth-check",function(e){e.originalEvent.returnValue=window.wp.i18n.__("Your session has expired. You can log in again from this page or go to the login page.")}),(e=i('<iframe id="wp-auth-check-frame" frameborder="0">').attr("title",t.text())).on("load",function(){var e,a;c=!0,n.removeClass("loading");try{e=(a=i(this).contents().find("body")).height()}catch(e){return s.addClass("fallback"),o.css("max-height",""),n.remove(),void t.focus()}e?a&&a.hasClass("interim-login-success")?h():o.css("max-height",e+40+"px"):a&&a.length||(s.addClass("fallback"),o.css("max-height",""),n.remove(),t.focus())}).attr("src",n.data("src")),n.append(e)),i("body").addClass("modal-open"),s.removeClass("hidden"),e?(e.focus(),setTimeout(function(){c||(s.addClass("fallback"),n.remove(),t.focus())},1e4)):t.focus()}())}).ready(function(){(s=i("#wp-auth-check-wrap")).find(".wp-auth-check-close").on("click",function(){h(),o=!0,window.clearTimeout(e),e=window.setTimeout(function(){o=!1},3e5)})})}(jQuery); |