Greasy Fork

AO3 Exchange requests' names link to their profiles

adds linked names to requests

< 脚本AO3 Exchange requests' names link to their profiles的反馈

评价:一般 - 脚本能用,但还有一些问题

§
发表于:2022-04-15
编辑于:2022-04-15

Pseuds break the url. FIX INCLUDED!
First of all, thank you for this code, it's been really helpful for exchanges!
Second, I've noticed a bug when dealing with pseuds since that breaks the url. Here's the code to fix it, simply replace line 20 (linkedName.href = "https://archiveofourown.org/users/" + authorName) with this snippet:

if (authorName.indexOf("(") > -1){
    let username = authorName.split("(")[1].split(")")[0];
    let pseud = authorName.split(" (")[0];
    linkedName.href = "https://archiveofourown.org/users/" + username + "/pseuds/" + pseud;
} else {
    linkedName.href = "https://archiveofourown.org/users/" + authorName;
}


Hope this helps!

exuvia作者
§
发表于:2022-05-27

Thank you very much for the fix! I'm occupied at the moment but expect this fix to be published in the next 1-3 days.

发表回复

登录以发表回复。