Your IP : 3.22.181.47


Current Path : /proc/self/root/home/sudancam/public_html3/games/wp-content/plugins/jetpack/_inc/build/
Upload File :
Current File : //proc/self/root/home/sudancam/public_html3/games/wp-content/plugins/jetpack/_inc/build/connect-button.min.js

jQuery(document).ready((function(n){var t=n(".jp-connect-button, #jp-connect-button--alt").eq(0),e=n(".jp-connect-full__tos-blurb"),o=n("#jetpack-connection-cards, .jp-connect-full__dismiss-paragraph, .jp-connect-full__testimonial"),a="";t.on("click",(function(t){if(t.preventDefault(),"undefined"==typeof URLSearchParams)a="";else{var e=new URLSearchParams(n(this).prop("search"));a=e&&e.get("from")}o.length&&o.fadeOut(600),i.startConnectionFlow()}));var i={isRegistering:!1,isPaidPlan:!1,startConnectionFlow:function(){var t=n("#jetpack-connection-cards, .jp-connect-full__testimonial");t.length&&t.fadeOut(600),i.isRegistering||i.handleConnection()},startAuthorizationFlow:function(n){n.alternateAuthorizeUrl?window.location=n.alternateAuthorizeUrl:window.location=n.authorizeUrl},handleConnection:function(){if("jp-connect-button--alt"!==t.attr("id")){i.isRegistering=!0,e.hide(),t.hide(),i.triggerLoadingState();var o=jpConnect.apiBaseUrl+"/connection/register";window.Initial_State&&window.Initial_State.calypsoEnv&&(o=o+"?"+n.param({calypso_env:window.Initial_State.calypsoEnv})),n.ajax({url:o,type:"POST",data:{registration_nonce:jpConnect.registrationNonce,_wpnonce:jpConnect.apiNonce,from:a},error:i.handleConnectionError,success:i.startAuthorizationFlow})}else{var r=a&&"&from="+a||"";window.location=jpConnect.connectInPlaceUrl+r}},triggerLoadingState:function(){var t=n("<span>").addClass("jp-connect-full__button-container-loading").text(jpConnect.buttonTextRegistering).appendTo(".jp-connect-full__button-container"),e=n("<div>").addClass("jp-spinner"),o=n("<div>").addClass("jp-spinner__outer").appendTo(e);n("<div>").addClass("jp-spinner__inner").appendTo(o),t.after(e)},fetchPlanType:function(){return n.ajax({url:jpConnect.apiBaseUrl+"/site",type:"GET",data:{_wpnonce:jpConnect.apiSiteDataNonce},success:function(n){var t=JSON.parse(n.data);i.isPaidPlan=t.options.is_pending_plan||!t.plan.is_free}})},receiveData:function(n){if(n.origin===jpConnect.jetpackApiDomain)switch(n.data){case"close":window.removeEventListener("message",this.receiveData),i.handleAuthorizationComplete();break;case"wpcom_nocookie":i.handleConnectionError()}},handleAuthorizationComplete:function(){i.isRegistering=!1,i.fetchPlanType().always((function(){if(i.isPaidPlan){var n=document.createElement("a");n.href=jpConnect.dashboardUrl;var t=window.location.pathname===n.pathname&&window.location.hash.length&&n.hash.length;window.location.assign(jpConnect.dashboardUrl),t&&window.location.reload(!0)}else window.location.assign(jpConnect.plansPromptUrl)}))},handleConnectionError:function(n){i.isRegistering=!1,window.location=t.attr("href")}};a=location.hash.split("&from=")[1]}));