Danbooru

Greasemonkey/User Script for translations [Updated: Jun. 25, 2012]

Posted under General

Updated, for those of us who like fancy-pants technicolor translation notes.

If anyone has any clever ideas about how to display the eyedropper result, do tell; copying to the clipboard would be optimal, but apparently that requires deep magic in Javascript.

Updated.

As the same-origin policy restriction on the <canvas> object hamstrings the eyedropper function rather convincingly, I've removed it entirely; if anyone has any workaround for this which can be executed in the context of a user script (or if it was still working for you somehow), let me know and I will gladly re-add it.

The major feature addition is the 'Special Characters' button, which facilitates insertion of some common special characters (♡♥☆★♪♫♂♀「」) into note text. Please let me know if there are any other useful characters which should be added; if I'm too slow about it, the list of special characters has been pulled to the top of the script so you can add them, or indeed any string of your choice, to the menu easily. (The background color for translation mode has also been pulled to the top for your convenience, if you find the new mild, pleasant turquoise disconcerting and would like to return to the old searing, garish green.)

The 'Save as Translated' button now sends another AJAX request to read tags from the image at the time the button is pressed, rather than reading from the HTML of the cached page. This means that using the script on posts like the Kogasa comics, which often have lots of tags added to them between the time the page is loaded and the time the translation is finished, will no longer result in a whole bunch of tags being inadvertently deleted. The regexes have also been fixed to work properly for some edge cases.

Thanks to RaisingK, Ars, and Moonspeaker for elucidating the nature of these and other bugs.

Kikimaru said:
Not sure if it's just me, but I can't use this with my latest Chrome build (v. 21.0.1180.75) as it won't let me install user scripts from anywhere but Chrome Web Store.

Try the fixes here; dragging and dropping scripts onto chrome://chrome/extensions/ worked for me with v21.0.1180.75.

Schrobby said:
Why use proprietary software like Chrome anyway? Try Firefox.

Your sanctimony would still be bullshit even if it wasn't coming from a Windows 7 user, but thanks for the laughs anyway.

First of, thank you for this great script. Very convenient to use, very easy too, as well as very useful.

I have a small issue with this script though, it concerns the use of special characters.
Currently when I try to use the special character addition, I have to first close the note and then open it again to add a special character. if I dared typing anything before adding the special character, then it does not work and I have to go back to the closing step.

Additionally, I would like to suggest making it so the special character box is a toggleable one, instead of just being a one time use then close box.
if possible, I would also like to suggest that the special character is added where the text cursor is, instead of at the end of the text.

This doesn't seem to work anymore for danbooru 2 - are there any "click & drag" scripts that have been updated for danbooru 2?

If not, that definitely seems a very handy/critical feature to have, surprised no one posted about it breaking yet.

1 2