Home  

Random  

Nearby  



Log in  



Settings  



Donate  



About Wikipedia  

Disclaimers  



Wikipedia





User:SD0001/StubSorter





User page  

Talk  



Language  

Watch  

Edit  


< User:SD0001
 


StubSorter
DescriptionA simple approach to stub sorting
Author(s)SD0001
StatusStable
UpdatedApril 21, 2023
    (15 months ago)
Browser supportAll modern desktop browsers, or IE 11
Skin supportAll skins, except Minerva
SourceUser:SD0001/StubSorter.js
StubSorter, showing a preview

StubSorter is a script intended to make stub sorting easier. It provides a simple HotCat-like search field to search for and add templates from Category:Stub message templates. It also allows you to remove existing stub templates.

When navigating to an article from the sorting backlog category CAT:STUBS, the script interface is opened automatically. Also to save you another click, {{stub}} is automatically removed when you add another stub template and save.

The keyboard shortcut Alt+⇧ Shift+SorAlt+S (on Mac Control+⌥ Option+S) can be used for saving.

Installation

edit

If you have the script-installer gadget, just click on the "Install" button in the infobox.

Otherwise, place the following line in your common.jsorskin.js page:

importScript('User:SD0001/StubSorter.js'); // [[User:SD0001/StubSorter.js]]

Search modes

edit

StubSorter searches for templates in Category:Stub message templates.

Note that all search results from a prefix search will not also appear in an intitle search, as one may expect. This is because the intitle search is looking for whole-word matches, whereas prefix search is happy to match partial-word matches. For example an intitle search for "jap" will not find "Japan-stub" whereas a prefix search will. An intitle search for "bio" on the other hand, will find "Japan-bio-stub" whereas a prefix search obviously wouldn't.

When you search, both prefix matches and intitle matches are retrieved. By default the prefix matches are shown at the top. You can change this using the dropdown menu.

The default mode is the first one. You may customize the default by adding to your common.js page:

StubSorter_searchBy = "searchMode"

replacing searchMode with prefix, intitleorregex.

Freeze button

edit

The "Freeze" button freezes the search results in place so that any more changing of the search query doesn't change the available options. Rather, the existing options are searched. This can be handy in situations where you want to do a search to filter the list of available templates, and then do another search to find the template from the filtered list.

As a bonus, freezing the menu will silently add extra results to the dropdown for the current search query, upto 500 prefix matches and 500 intitle matches. Otherwise, only upto 100 prefix and intitle matches each are shown.

Customisation

edit

Watchlisting

edit

By default, the pages you stub-sort will not be added to your watchlist. To customise this, add the following line, just below the above one in your common.js:

StubSorter_watchlist = "watch";

The value can be:

Minor edit

edit

By default edits are marked as minor. To disable this, add

StubSorter_minor = false;
edit

The "Stub sort" menu option is available in the "More" dropdown menu (the p-cactions menu). You may change its location to any of the other portlet menus per Help:Customizing toolbars.

StubSorter_portlet = "portlet-name";

Troubleshooting

edit
Are suggestions being loaded too slowly?

This could happen occasionally due to delays in getting responses to API calls. If you are experiencing issues persistently, drop me a line with the following information:

Unable to see a particular stub template?

This is because the stub template is not there in Category:Stub message templates, most probably because the template is malformed.

See also

edit

Retrieved from "https://en.wikipedia.org/w/index.php?title=User:SD0001/StubSorter&oldid=1143878118"
 



Last edited on 10 March 2023, at 13:18  


Languages

 



This page is not available in other languages.
 

Wikipedia


This page was last edited on 10 March 2023, at 13:18 (UTC).

Content is available under CC BY-SA 4.0 unless otherwise noted.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Terms of Use

Desktop