carousel
1 month ago
comment-likes
7 months ago
custom-post-types
7 months ago
images
2 weeks ago
infinite-scroll
2 months ago
likes
1 month ago
related-posts
7 months ago
scan
2 weeks ago
sharedaddy
2 months ago
shortcodes
4 days ago
social-logos
3 months ago
subscriptions
4 months ago
theme-tools
4 days ago
tiled-gallery
7 months ago
videopress
7 months ago
widget-visibility
2 weeks ago
widgets
4 days ago
wordads
2 weeks ago
accessible-focus.min.asset.php
7 months ago
accessible-focus.min.js
7 months ago
admin.asset.php
4 days ago
admin.css
2 weeks ago
admin.js
4 days ago
admin.js.LICENSE.txt
2 weeks ago
admin.rtl.css
2 weeks ago
content-guidelines-ai.css
4 days ago
content-guidelines-ai.min.asset.php
4 days ago
content-guidelines-ai.min.js
4 days ago
content-guidelines-ai.rtl.css
4 days ago
crowdsignal-shortcode.min.asset.php
3 years ago
crowdsignal-shortcode.min.js
3 years ago
crowdsignal-survey.min.asset.php
4 years ago
crowdsignal-survey.min.js
4 years ago
deprecate.min.asset.php
7 months ago
deprecate.min.js
7 months ago
facebook-embed.min.asset.php
4 years ago
facebook-embed.min.js
4 years ago
gallery-settings.min.asset.php
7 months ago
gallery-settings.min.js
7 months ago
jetpack-admin.min.asset.php
7 months ago
jetpack-admin.min.js
7 months ago
jetpack-ai-admin.asset.php
4 days ago
jetpack-ai-admin.css
4 days ago
jetpack-ai-admin.js
4 days ago
jetpack-ai-admin.js.LICENSE.txt
2 months ago
jetpack-ai-admin.rtl.css
4 days ago
jetpack-deactivate-dialog.min.asset.php
7 months ago
jetpack-deactivate-dialog.min.js
7 months ago
jetpack-modules.min.asset.php
7 months ago
jetpack-modules.min.js
7 months ago
jetpack-modules.models.min.asset.php
7 months ago
jetpack-modules.models.min.js
7 months ago
jetpack-modules.views.min.asset.php
7 months ago
jetpack-modules.views.min.js
7 months ago
network-admin.asset.php
2 weeks ago
network-admin.css
2 weeks ago
network-admin.js
1 month ago
network-admin.rtl.css
2 weeks ago
newsletter-widget.asset.php
2 weeks ago
newsletter-widget.css
7 months ago
newsletter-widget.js
2 weeks ago
newsletter-widget.js.LICENSE.txt
7 months ago
newsletter-widget.rtl.css
7 months ago
plugins-page.asset.php
2 weeks ago
plugins-page.css
1 year ago
plugins-page.js
2 weeks ago
plugins-page.js.LICENSE.txt
4 years ago
plugins-page.rtl.css
1 year ago
polldaddy-shortcode.min.asset.php
3 months ago
polldaddy-shortcode.min.js
3 months ago
site-switcher.min.asset.php
4 days ago
site-switcher.min.js
4 days ago
static-noscript-notice.html
8 years ago
static-version-notice.html
8 years ago
static.html
1 month ago
static.js.LICENSE.txt
7 months ago
style.min.css
1 month ago
style.min.rtl.css
1 month ago
twitter-timeline.min.asset.php
2 years ago
twitter-timeline.min.js
2 years ago
site-switcher.min.js
3 lines
| 1 | (()=>{"use strict";var e={790(e){e.exports=window.ReactJSXRuntime},1455(e){e.exports=window.wp.apiFetch},2165(e){e.exports=window.wp.commands},6087(e){e.exports=window.wp.element},7723(e){e.exports=window.wp.i18n},5573(e){e.exports=window.wp.primitives},9058(e,t,n){n.d(t,{A:()=>a});var o=n(5573),r=n(790),a=(0,r.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(o.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm0 1.5c3.4 0 6.2 2.7 6.5 6l-1.2-.6-.8-.4c-.1 0-.2 0-.3-.1H16c-.1-.2-.4-.2-.7 0l-2.9 2.1L9 11.3h-.7L5.5 13v-1.1c0-3.6 2.9-6.5 6.5-6.5Zm0 13c-2.7 0-5-1.7-6-4l2.8-1.7 3.5 1.2h.4s.2 0 .4-.2l2.9-2.1.4.2c.6.3 1.4.7 2.1 1.1-.5 3.1-3.2 5.4-6.4 5.4Z"})})}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o=n(1455),r=n.n(o),a=n(2165),c=n(6087),i=n(7723),s=n(9058),w=n(790);const __=i.__,d=`jetpack_site_switcher_sites_${window.jetpackSiteSwitcherConfig?.userId||0}`;async function p(){const e=function(){try{const e=localStorage.getItem(d);if(!e)return null;const{sites:t,timestamp:n}=JSON.parse(e);return Date.now()-n<36e5?t:(localStorage.removeItem(d),null)}catch{return null}}();if(e)return e;const t=window.jetpackSiteSwitcherConfig?.apiPath;try{const e=(await r()({path:t,method:"GET",global:!0})).sites||[];return function(e){try{localStorage.setItem(d,JSON.stringify({sites:e,timestamp:Date.now()}))}catch{}}(e),e}catch{return[]}}function l(e){if(!e)return"";try{return new URL(e).hostname}catch{return""}}function u(e){return e?e.replace(/\/+$/,""):e}function m({search:e}){const[t,n]=(0,c.useState)([]),[o,r]=(0,c.useState)(!0);(0,c.useEffect)(()=>{p().then(e=>{n(e),r(!1)}).catch(()=>{r(!1)})},[]);return{commands:(0,c.useMemo)(()=>{if(!t||0===t.length)return[];const n=e?e.toLowerCase():"",o=[__("site","jetpack").toLowerCase(),__("switch","jetpack").toLowerCase(),__("switch site","jetpack").toLowerCase()];let r=n;o.forEach(e=>{var t;r=r.replace(new RegExp(`\\b${t=e,t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"g")," ")}),r=r.trim().replace(/\s+/g," ");const a=r&&o.some(e=>e.startsWith(r)),c=(!r||a?t:t.filter(e=>{const t=l(e.URL);return e.name&&e.name.toLowerCase().includes(r)||t.toLowerCase().includes(r)})).filter(e=>e.URL&&""!==l(e.URL)),d=u(window.location.href.toLowerCase());return c.filter(e=>{const t=u(e.URL.toLowerCase());return!d.startsWith(t)}).map(e=>{const t=l(e.URL),n=e.icon?.img?(0,w.jsx)("img",{src:e.icon.img,alt:""}):s.A;return{name:`jetpack/switch-to-site-${t}`,label:e.name?(0,i.sprintf)(/* translators: %1$s: site name, %2$s: site domain */ |
| 2 | __("Switch to %1$s (%2$s)","jetpack"),e.name,t):(0,i.sprintf)(/* translators: %s: site domain */ |
| 3 | __("Switch to %s","jetpack"),t),icon:n,callback:({close:t})=>{try{window.location.href=new URL("/wp-admin",e.URL).href}catch{}t()},keywords:[e.name,t,__("site","jetpack"),__("switch site","jetpack")].filter(Boolean)}})},[t,e]),isLoading:o}}function h(){return(0,a.useCommandLoader)({name:"jetpack/site-switcher",hook:m}),null}if("undefined"!=typeof window&&window.wp&&window.wp.element&&window.wp.commands){const{createRoot:e,createElement:t}=window.wp.element,n=document.createElement("div");n.id="jetpack-site-switcher",n.style.display="none","loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.body.appendChild(n),e(n).render(t(h))}):(document.body.appendChild(n),e(n).render(t(h)))}})(); |