Replace hitcount with kudos/hits percentage. Sort works on the page by this ratio.
< Feedback on AO3: Kudos/hits ratio
edit
changed it to
// count percentage
var percents;
if (chapters_count > 3) {
percents = 10 * kudos_count / new_hits_count;
} else {
percents = 100 * kudos_count / new_hits_count;
}
var p_value = getPValue(new_hits_count, kudos_count, chapters_count);
if (p_value < 0.05) {
percents = 1;
I was getting the huge ratios, so I changed
/ count percentage
var percents = 100*kudos_count/new_hits_count;
if (kudos_count < 11) {
percents = 1;
to
/ count percentage
var percents = .1*kudos_count/new_hits_count;
if (kudos_count < 11) {
percents = 1;
and that seems to have fixed it