From 0b451737b53490b858bdbcfecea68900ec7b8531 Mon Sep 17 00:00:00 2001 From: Maud Leray Date: Sun, 20 Oct 2024 16:45:20 +0200 Subject: [PATCH] Test new interactive API with Query Loop block This block has it natively, it would be nice to use in our listing pages --- assets/src/js/external_links.js | 2 +- parts/query-listing-page.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/src/js/external_links.js b/assets/src/js/external_links.js index b18945bdc3..6bfc5f0746 100644 --- a/assets/src/js/external_links.js +++ b/assets/src/js/external_links.js @@ -3,7 +3,7 @@ const {__} = wp.i18n; export const setupExternalLinks = () => { const siteURL = window.location.host; - const linkSelector = ['.page-content', 'article', '.author-details'].map(sel => `${sel} a:not(.btn):not(.cover-card-heading):not(.wp-block-button__link):not(.share-btn):not([href*="${siteURL}"]):not([href*=".pdf"]):not([href^="/"]):not([href^="#"]):not([href^="javascript:"])`).join(', '); + const linkSelector = ['.page-content', 'article', '.author-details'].map(sel => `${sel} a:not(.btn):not(.cover-card-heading):not(.wp-block-button__link):not(.share-btn):not([href*="${siteURL}"]):not([href*=".pdf"]):not([href^="/"]):not([href^="#"]):not([href^="javascript:"]):not(.page-numbers)`).join(', '); const links = [...document.querySelectorAll(linkSelector)]; links.forEach(link => { diff --git a/parts/query-listing-page.html b/parts/query-listing-page.html index 384f4b58c8..855794867b 100644 --- a/parts/query-listing-page.html +++ b/parts/query-listing-page.html @@ -1,4 +1,4 @@ - +