AO3: Tracking

Track any filterable listing.

< 腳本AO3: Tracking的回應

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

§
發表於:2023-02-28
編輯:2023-02-28

I love this script but found it doesn't get the right count when there are more than 1k due to commas.


I modified the below line in checkOpen()
//var current_count = parseInt(heading.text().replace(/\n/g, '').replace(/^\s+/, '').replace(/.*\d+ - \d+ of /, '').replace(/(\d+)(.+)/, '$1'));
to:
var rawString = heading.text().replace(/\n/g, '').replace(/^\s+/, '').replace(/.*\d+ - \d+ of /, '').replace(/(,\d+)(.+)/, '$1').replace(/(,+)/, '');
var current_count = parseInt(rawString)

To basically allow commas in the digit finding, then remove all the commas before parsing int. Hope this helps someone else

Min_作者
§
發表於:2023-02-28

Thanks for identifying the problem! It should be fixed now.

§
發表於:2023-03-01

It looks great! Thank you for updating, this script is so very useful to me every day.

發表回覆

登入以回復

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址