Table Sorting By Script
When looking at someone's SUL accounts at Special:CentralAuth, it would be useful to have the table automatically sorted by edit count when the page opens. Does anyone know if there's a way to sort a table by a specified column in Javascript? Jafeluv (talk) 13:04, 14 December 2012 (UTC)
- Yes. You're looking for Quentinv57's tool. Legoktm (talk) 13:34, 14 December 2012 (UTC)
- Hmm... That's not sorted by edit count by default either, is it? Jafeluv (talk) 13:47, 14 December 2012 (UTC)
- Not by default, but if you hit the arrow it will sort. Legoktm (talk) 16:27, 14 December 2012 (UTC)
- You can do that in CentralAuth as well, of course. But the question was whether it can be done by script. Jafeluv (talk) 11:23, 15 December 2012 (UTC)
- try adding the following line to Special:Mypage/common.js
if (wgCanonicalSpecialPageName == "CentralAuth") $(function {$('th:Contains(Edit count)').click.click})
peace - קיפודנחש (aka kipod) (talk) 19:50, 15 December 2012 (UTC)
- Thanks! Can't seem to get it to work, though... Any idea what I'm doing wrong? Jafeluv (talk) 07:54, 17 December 2012 (UTC)
- try adding the following line to Special:Mypage/common.js
if (wgCanonicalSpecialPageName == "CentralAuth") $(function {$('th:Contains(Edit count)').click.click})
peace - קיפודנחש (aka kipod) (talk) 19:50, 15 December 2012 (UTC)
- You can do that in CentralAuth as well, of course. But the question was whether it can be done by script. Jafeluv (talk) 11:23, 15 December 2012 (UTC)
- Not by default, but if you hit the arrow it will sort. Legoktm (talk) 16:27, 14 December 2012 (UTC)
- Hmm... That's not sorted by edit count by default either, is it? Jafeluv (talk) 13:47, 14 December 2012 (UTC)
Read more about this topic: Village Pump (technical)
Famous quotes containing the words table and/or script:
“Remember thee?
Ay, thou poor ghost, whiles memory holds a seat
In this distracted globe. Remember thee?
Yea, from the table of my memory
Ill wipe away all trivial fond records,
All saws of books, all forms, all pressures past
That youth and observation copied there,
And thy commandment all alone shall live
Within the book and volume of my brain,”
—William Shakespeare (15641616)
“Genghis Khan, in his usual jodhpurs accessorized with whip, straddled a canvas chair and gloated upon the fairyland he had built. Journalists, photographers, secretaries, sycophants, script girls, and set dressers milled and stirred around him, activity ... irresistibly reminiscent of the movement of maggots upon rotting meat.”
—Angela Carter (19401992)