2020-06-16 03:09:09 -04:00
|
|
|
!function(h){var d;function s(){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()),d.fadeOut(200,function(){d.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"]&&d.hasClass("hidden")?function(){var e,t=h("#wp-auth-check"),c=h("#wp-auth-check-form"),n=d.find(".wp-auth-fallback-expired"),o=!1;c.length&&(h(window).on("beforeunload.wp-auth-check",function(e){e.originalEvent.returnValue=window.authcheckL10n.beforeunload}),(e=h('<iframe id="wp-auth-check-frame" frameborder="0">').attr("title",n.text())).on("load",function(){var e,a;o=!0,c.removeClass("loading");try{e=(a=h(this).contents().find("body")).height()}catch(e){return d.addClass("fallback"),t.css("max-height",""),c.remove(),void n.focus()}e?a&&a.hasClass("interim-login-success")?s():t.css("max-height",e+40+"px"):a&&a.length||(d.addClass("fallback"),t.css("max-height",""),c.remove(),n.focus())}).attr("src",c.data("src")),c.append(e)),h("body").addClass("modal-open"),d.removeClass("hidden"),e?(e.focus(),setTimeout(function(){o||(d.addClass("fallback"),c.remove(),n.focus())},1e4)):n.focus()}():a["wp-auth-check"]&&!d.hasClass("hidden")&&s())}).ready(function(){(d=h("#wp-auth-check-wrap")).find(".wp-auth-check-close").on("click",function(){s()})})}(jQuery);
|