diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js index b64fe951..3a298782 100644 --- a/Resources/Scripts/code.js +++ b/Resources/Scripts/code.js @@ -1196,6 +1196,17 @@ } }); + // + // Block: Reorder search results to move accounts above hashtags. + // + onAppReady.push(function(){ + let container = $(".js-search-in-popover"); + let hashtags = $(".js-typeahead-topic-list", container); + + $(".js-typeahead-user-list", container).insertBefore(hashtags); + hashtags.addClass("list-divider"); + }); + // // Block: Make submitting search queries while holding Ctrl or middle-clicking the search icon open the search externally. // diff --git a/Resources/Scripts/styles/browser.css b/Resources/Scripts/styles/browser.css index 09b11818..565c5051 100644 --- a/Resources/Scripts/styles/browser.css +++ b/Resources/Scripts/styles/browser.css @@ -195,6 +195,11 @@ a[data-full-url] { color: #9f51cf !important; } +.js-typeahead-user-list.is-hidden + .js-typeahead-topic-list { + /* hide custom search result divider when not needed */ + border-top: none !important; +} + /***************************************/ /* Replace 'Stay open' with a pin icon */ /***************************************/