Skip to content

Instantly share code, notes, and snippets.

@tablacus
Created July 12, 2020 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tablacus/deb006de90ba070289a6095ba43cbd6d to your computer and use it in GitHub Desktop.
Save tablacus/deb006de90ba070289a6095ba43cbd6d to your computer and use it in GitHub Desktop.
Click the date modified column to sort in ascending order
AddEvent("ColumnClick", function (Ctrl, iItem) {
var cColumns = api.CommandLineToArgv(Ctrl.Columns(1));
var s = cColumns[iItem * 2];
if (s == "System.DateModified" && Ctrl.SortColumn(1) !== "System.DateModified" && api.GetKeyState(VK_SHIFT) >= 0) {
Ctrl.SortColumn = "System.DateModified";
return S_OK;
}
});
@tablacus
Copy link
Author

tablacus commented Jul 12, 2020

Add-on "Run at setup"
Type: JScript
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment