AO3: Quality score (Adjusted Kudos/Hits ratio)

Uses the kudos/hits ratio, number of chapters, and statistical evaluation to score and sort AO3 works.

< 腳本AO3: Quality score (Adjusted Kudos/Hits ratio)的回應

評論:正評 - 腳本一切正常

§
發表於:2023-08-01
編輯:2023-08-01

((Bug fix))

I really love this script and have been using it for a while, it really improves the AO3 browsing experience! Recently I started noticing a bug where some scores were really wonky, like in the thousands/ten-thousands. I did a bit of poking around, it seems like an issue with parseInt not dealing with the commas in the strings correctly (maybe javascript had an update that messed it up or something idk). Anyway the fix is really simple: just add .replace(',', '') after the .text() bit on lines 132 and 133!

Basically what used to be

var hits_count = parseInt(hits_value.text());
var kudos_count = parseInt(kudos_value.text());

should now be

var hits_count = parseInt(hits_value.text().replace(',', ''));
var kudos_count = parseInt(kudos_value.text().replace(',', ''));

Hope this helps anyone who's having this issue, and thanks so much to OP for writing the script!

§
發表於:2023-08-01

THANK YOU!

Seriously, I was so lost without this!

發表回覆

登入以回復