Danbooru

[Userscript] Translate Pixiv Tags

Posted under General

This is a userscript that translates tags and artist names on Pixiv to their corresponding Danbooru tags. Also works on ArtStation, BCY, DeviantArt, Hentai-Foundry, NicoSeiga, Nijie, Pawoo, SauceNAO, Tinami, and Twitter.

You can also hover over artist tags to see the artist entry and the artist's latest uploads on Danbooru.

Screenshots
Installation
Code
Changelog
FAQ

Updated

Would it be possible to translate the artist name? This should really only involve doing a query for the artist profile URL on Danbooru's artist DB. This would help clue in users as to who the artist is, as well as whether an artist entry needs to be created. To make things easier, it could only be done on the same pages that get the tags translated.

New release (2017.12.08 13:33:01)

New features:

  • Added support for Monappy (http://monappy.jp).
  • Artist tags are now also looked up. The Danbooru artist tag will be shown next to the artist's Pixiv / Nijie / Monappy name.

Artist tags are found in the same way that Danbooru finds artists. If you have a Pixiv artist whose profile is https://www.pixiv.net/member.php?id=9948, for example, then we search the /artists listing for that profile, like so. So if you find an artist that doesn't have an artist tag, it means you need to update their artist entry and add their profile URL(s).

For Monappy, artist lookup is done by the Twitter profile URL. Most artists haven't had their Monappy profiles added to their artist entries yet, so Twitter gives better results.

New release (2017.12.26 17:05:26)

  • Add artist tag lookup for twitter.com, nicoseiga.jp, bcy.net, tinami.com, deviantart.com, and hentaifoundry.net.
  • Add "(banned)" after the artist name for banned artists.

I think Pixiv made a change a few days ago that broke this plugin. On the main page for a piece of art, there are now romaji transliterations of the tags, and the translated tags from this script don't appear. They DO appear on the "Add Bookmark" page, though, and the romaji is not there. I would guess that the romaji change probably broke whatever selection rules the script uses to find tags on the page.

I would greatly appreciate a fix, as this plugin is an absolute godsend when browsing Pixiv.

In case it's relevant, I'm using Greasemonkey on Firefox 58.

coredumperror said:

I think Pixiv made a change a few days ago that broke this plugin. On the main page for a piece of art, there are now romaji transliterations of the tags, and the translated tags from this script don't appear. They DO appear on the "Add Bookmark" page, though, and the romaji is not there. I would guess that the romaji change probably broke whatever selection rules the script uses to find tags on the page.

I would greatly appreciate a fix, as this plugin is an absolute godsend when browsing Pixiv.

In case it's relevant, I'm using Greasemonkey on Firefox 58.

Evazion knows about this but didn't start working on a fix until recently, no telling how long it will take.

New release (2018.04.01 17:11:12)

  • Added artist tag tooltips. Hover over an artist tag to see their Danbooru artist entry, plus a preview of their recent Danbooru posts (screenshot).
Fixes
  • Pixiv: fix translated tags being broken by Pixiv's new romaji tags.
  • Pixiv: fix artist tags not being translated on search pages.
  • BCY: fix tags not being translated on illust pages and on tag search pages.

Pixiv updated their UI (quite radically, this time), and this script broke again. It still works fine on the Add Bookmark page, but it doesn't work at all on the main page for the artwork.

I tried to look into how things had changed, to hopefully figure out a fix. But it looks like Pixiv now uses these mangled CSS classes that I can't figure out at all. :(

I haven't gotten the redesign on any of my three test accounts yet. Pixiv sometimes enables changes for only a subset of their userbase, before rolling them out sitewide. Unless someone has a login they're willing to share, I won't be able to work on this until I get the redesign for myself.

Found an interesting error recently. artist #168452 was created which begins with a "<" and ends with a ">", so when it gets rendered in page the HTML thinks it's an HTML tag so it doesn't show up on the screen. I'm not sure such tag names should even be allowed, but for now at least it seems like they can be created.

1 2 3