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.

發表回覆

登入以回復

QingJ © 2025

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