User:GhostInTheMachine/SortSearchResults
|
GhostInTheMachine • Talk • Barnstars • Help • Misc • Modules • Other • Layout • Photos • Projects • Scripts • Tidying • TidyingSD • UBX • WIP • 2025-09-26 09:03:25 |
Purpose
[edit]Sorts the results returned by the search page. Articles are sorted to the top and pages in other spaces are sorted within the space (by space number, so Talk: is after articles).
Use
[edit]The script runs shortly after the search page returns the results, so the results are displayed first in their unsorted state and then sorted.
It does nothing for other pages.
Prerequisites
[edit]None.
Installing
[edit]Add the following line to your common.js file.
{{subst:Lusc|User:GhostInTheMachine/SortSearchResults.js}}
this also works (although we are not supposed to use importScript ...)
importScript('User:GhostInTheMachine/SortSearchResults.js'); // Backlink: User:GhostInTheMachine/SortSearchResults.js
Notes
[edit]Inspired by a request from User:Headbomb in August 2025.
Alternatives
[edit]The search system should allow an option for the results to be sorted by page name, so that this script is not needed.
Reported as
T403775 on 4 September 2025.