diff options
Diffstat (limited to 'plugins/jetpack/_inc/build/idc-notice.min.js')
-rw-r--r-- | plugins/jetpack/_inc/build/idc-notice.min.js | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/plugins/jetpack/_inc/build/idc-notice.min.js b/plugins/jetpack/_inc/build/idc-notice.min.js deleted file mode 100644 index 0d410e4b..00000000 --- a/plugins/jetpack/_inc/build/idc-notice.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* Do not modify this file directly. It is compiled from other files. */ -/* global idcL10n, jQuery, analytics, history, wpCookies */ -!function(e){var i,c=idcL10n.nonce,n=idcL10n.currentUrl,t=idcL10n.apiRoot,o=e(".jp-idc-notice"),a=e(".jp-idc-notice .dops-button"),r=idcL10n.tracksUserData,s=idcL10n.tracksEventData,d=e("#wp-admin-bar-jetpack-idc"),f=e("#jp-idc-confirm-safe-mode-action"),p=e("#jp-idc-fix-connection-action"),l=e("#jp-idc-migrate-action"),u=e("#jp-idc-reconnect-site-action"),m=e(".jp-idc-error__notice"),_=!1;function h(){a.prop("disabled",!0)}function j(){a.prop("disabled",!1)}function k(){m.hide(),g("confirm_safe_mode");var i=t+"jetpack/v4/identity-crisis/confirm-safe-mode";h(),e.ajax({method:"POST",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",c)},url:i,data:{},success:function(){o.hide(),d.removeClass("hide"),window.location.search&&1===window.location.search.indexOf("page=jetpack")&&window.location.reload()},error:function(e){_="confirm",v(e),j()}})}function w(){m.hide(),g("migrate");var i=t+"jetpack/v4/identity-crisis/migrate";h(),e.ajax({method:"POST",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",c)},url:i,data:{},success:function(){o.hide(),e("body").hasClass("toplevel_page_jetpack")&&window.location.reload(!0)},error:function(e){_="migrate",v(e),j()}})}function y(){m.hide(),g("start_fresh");var i=t+"jetpack/v4/identity-crisis/start-fresh";h(),e.ajax({method:"POST",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",c)},url:i,data:{},success:function(e){window.location=e+"&from=idc-notice"},error:function(e){_="start-fresh",v(e),j()}})}function v(i){var c=e(".jp-idc-error__desc");i&&i.responseJSON&&i.responseJSON.message?c.html(i.responseJSON.message):c.html(""),m.css("display","flex")}function g(e,i){void 0!==i&&"object"==typeof i||(i={}),e&&e.length&&"undefined"!=typeof analytics&&analytics.tracks&&analytics.mc&&(e=0!==(e=e.replace(/-/g,"_")).indexOf("jetpack_idc_")?"jetpack_idc_"+e:e,analytics.tracks.recordEvent(e,i),e=(e=e.replace("jetpack_idc_","")).replace(/_/g,"-"),analytics.mc.bumpStat("jetpack-idc",e))}"undefined"!=typeof analytics&&analytics.initialize(r.userid,r.username),s.isAdmin?g("notice_view"):g("non_admin_notice_view",{page:s.currentScreen}),i=void 0!==i&&i,window.location.search&&-1!==window.location.search.indexOf("jetpack_idc_clear_confirmation")&&(g("clear_confirmation_clicked"),history&&history.pushState?history.pushState({},"",n):i&&(window.location.href=n)),o.on("click",".notice-dismiss",function(){var e="https:"===window.location.protocol;wpCookies.set("jetpack_idc_dismiss_notice","1",604800,!1,!1,e),g("non_admin_notice_dismiss",{page:s.currentScreen})}),o.on("click","#jp-idc-error__action",function(){switch(m.hide(),_){case"confirm":k();break;case"start-fresh":y();break;case"migrate":w();break;default:return}}),f.on("click",k),p.on("click",function(){m.hide(),g("fix_connection"),o.addClass("jp-idc-show-second-step")}),u.on("click",y),l.on("click",w)}(jQuery);
\ No newline at end of file |