File "classic-editor-connections.js"

Full Path: /home/warrior1/public_html/wp-content-20241001222009/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/build/classic-editor-connections.js
File size: 1.59 KB
MIME-type: text/html
Charset: utf-8

(()=>{"use strict";var e={736:e=>{e.exports=window.wp.i18n}},n={};function o(t){var r=n[t];if(void 0!==r)return r.exports;var s=n[t]={exports:{}};return e[t](s,s.exports,o),s.exports}o.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return o.d(n,{a:n}),n},o.d=(e,n)=>{for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e=o(736);const _n=e._n,{ajaxUrl:n,connectionsUrl:t}=window.jetpackSocialClassicEditorConnections;jQuery((function(e){let o=!1;const r=function(){o||(e.post(n,{action:"test_publicize_conns"},a),o=!0)};let s;window.addEventListener("focus",(()=>{s&&clearTimeout(s),s=setTimeout(r,2e3)}));const a=function(n){o=!1;const r=e("#pub-connection-tests");r.removeClass("test-in-progress").removeClass("below-h2").removeClass("error").removeClass("publicize-token-refresh-message").html("");const s=n.data?n.data.reduce(((n,o)=>o.connectionTestPassed?n:(e("#wpas-submit-"+o.unique_id).prop("checked",!1).prop("disabled",!0),n+1)),0):0;if(s){
/* translators: %s is the link to the connections page in Calypso */
const e=_n('One of your social connections is broken. Reconnect it on the <a href="%s" rel="noopener noreferrer" target="_blank">connection management</a> page.','Some of your social connections are broken. Reconnect them on the <a href="%s" rel="noopener noreferrer" target="_blank">connection management</a> page.',s,"jetpack-publicize-pkg");r.addClass("below-h2").addClass("error").addClass("publicize-token-refresh-message").append(e.replace("%s",t))}};e("#pub-connection-tests").length&&r()}))})()})();