From 501286a15d0faeab1a08f7180a39fcff699d1392 Mon Sep 17 00:00:00 2001 From: alistair3149 Date: Mon, 5 Dec 2022 21:13:05 -0500 Subject: [PATCH] =?UTF-8?q?fix(search):=20=F0=9F=90=9B=20update=20selector?= =?UTF-8?q?=20for=20fulltexturl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/skins.citizen.search/typeahead.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/skins.citizen.search/typeahead.js b/resources/skins.citizen.search/typeahead.js index f31ad682..b7089f52 100644 --- a/resources/skins.citizen.search/typeahead.js +++ b/resources/skins.citizen.search/typeahead.js @@ -300,6 +300,7 @@ function getMenuItem( data ) { function updateTypeahead( messages ) { const searchQuery = searchInput.value, footer = document.getElementById( PREFIX + '-footer' ), + footerLink = footer.querySelector( '.' + PREFIX + '__content' ), footerText = footer.querySelector( '.' + PREFIX + '__description' ), fullTextUrl = config.wgScriptPath + '/index.php?title=Special:Search&fulltext=1&search='; @@ -307,11 +308,11 @@ function updateTypeahead( messages ) { const footerQuery = mw.html.escape( searchQuery ); footerText.innerHTML = messages.fulltext + ' ' + footerQuery + ''; footerQuery.textContent = searchQuery; - footer.setAttribute( 'href', fullTextUrl + searchQuery ); + footerLink.setAttribute( 'href', fullTextUrl + searchQuery ); getSuggestions( searchQuery ); } else { footerText.textContent = messages.empty; - footer.setAttribute( 'href', fullTextUrl ); + footerLink.setAttribute( 'href', fullTextUrl ); clearSuggestions(); } }