evazion / translate-pixiv-tags

MIT License
35 stars 6 forks source link

The script fails at pixiv profile page for artist with 0 followers #8

Closed 7nik closed 5 years ago

7nik commented 5 years ago

If a pixiv artist has 0 followers then there is no a._13OcQAQ element and the script can't add artist translation. Example: https://www.pixiv.net/member.php?id=13167207 a.k.a. berryverrine on the Danbooru.

evazion commented 5 years ago

Fixed by switching to use the profile image element:

image

There's less space here, though, so sometimes long names have to linewrap.

7nik commented 5 years ago

Why not add the link after user name? asyncAddTranslatedArtists("._2VLnXNk", "._2VLnXNk", ()=>window.location.href.match(/[?&]id=(\d+)/)[1]); And a little of css for better look #ex-pixiv ._2qMhDQk { flex-direction: column; align-items: flex-start; } image

evazion commented 5 years ago

Yeah, I like that better. Moved it there in 45d9760bff6a8daeb823347da76688a4d01041b3.