Sort List Numerically [JS1]
Your own sort method
The numerical sort is achieved by using a custom sort function:
Other sortings can be used, but a clear criteria is needed. For example, to sort resolutions like 1280×720 and 1200×800, which of them goes first? If the criteria is "first width, then height" 1200×800 would go before 1280×720. But if the criteria is "amount of pixels", 1280×720 (922K pixels) would go before 1200×800 (960K pixels).
Don't download the shortcut
If you just want the code, there's no need to download the shortcut. Copy this and paste it in a "URL" action:
REPLACETHISWITHLISTVARIABLE fragment with the variable contaning the list, add a "Get File of Type" with type
com.apple.webarchive below, and split its output with new lines to get the sorted list.
I use "Get File of Type" instead of "Get Contents of Webpage" to avoid that the user is misleading told that the shortcut uses Safari.
Latest Release Notes
1.0.0 - Oct. 3, 2020, 8:40 a.m.
First public version