mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-27 11:38:01 +01:00
1 line
1.3 KiB
JavaScript
1 line
1.3 KiB
JavaScript
|
"use strict";(self.__WordPressPrivateInteractivityAPI__=self.__WordPressPrivateInteractivityAPI__||[]).push([[155],{890:function(e,t,r){var a=r(754);const o=e=>e&&e instanceof window.HTMLAnchorElement&&e.href&&(!e.target||"_self"===e.target)&&e.origin===window.location.origin;(0,a.h)({selectors:{core:{query:{startAnimation:({context:e})=>"start"===e.core.query.animation,finishAnimation:({context:e})=>"finish"===e.core.query.animation}}},actions:{core:{query:{navigate:async({event:e,ref:t,context:r})=>{if(o(t)&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey||e.defaultPrevented))(e)){e.preventDefault();const o=t.closest("[data-wp-navigation-id]").dataset.wpNavigationId,i=setTimeout((()=>{r.core.query.message=r.core.query.loadingText,r.core.query.animation="start"}),400);await(0,a.c4)(t.href),clearTimeout(i),r.core.query.message=r.core.query.loadedText+(r.core.query.message===r.core.query.loadedText?" ":""),r.core.query.animation="finish",r.core.query.url=t.href;const n=`[data-wp-navigation-id=${o}] .wp-block-post-template a[href]`;document.querySelector(n)?.focus()}},prefetch:async({ref:e})=>{o(e)&&await(0,a.tL)(e.href)}}}},effects:{core:{query:{prefetch:async({ref:e,context:t})=>{t.core.query.url&&o(e)&&await(0,a.tL)(e.href)}}}}})}},function(e){var t;t=890,e(e.s=t)}]);
|