Skip to content

Commit

Permalink
npp-sorting: sort creator field by edit count
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Oct 15, 2023
1 parent 7d87b69 commit 2c561b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions reports/npp-sorting/npp-sorting.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,16 +269,16 @@ ${replagMessage}

var editorString;
if (tabledata.creatorEdits) {
editorString = `[[Special:Contribs/${tabledata.creator}|${tabledata.creator}]] (${tabledata.creatorEdits})`;
editorString = `data-sort-value=${tabledata.creatorEdits} | [[Special:Contribs/${tabledata.creator}|${tabledata.creator}]] (${tabledata.creatorEdits})`;
} else {
// lowercase IPv6 address and split to 2 lines to reduce column width
if (Mwn.util.isIPv6Address(tabledata.creator)) {
var ip = tabledata.creator.toLowerCase();
var idx = Math.round(ip.length / 2);
ip = ip.slice(0, idx) + '<br>' + ip.slice(idx);
editorString = `[[Special:Contribs/${tabledata.creator}|${ip}]]`;
editorString = `data-sort-value=0 | [[Special:Contribs/${tabledata.creator}|${ip}]]`;
} else {
editorString = `[[Special:Contribs/${tabledata.creator}|${tabledata.creator}]]`;
editorString = `data-sort-value=0 | [[Special:Contribs/${tabledata.creator}|${tabledata.creator}]]`;
}
}

Expand Down

0 comments on commit 2c561b9

Please sign in to comment.