A sudden platinum upgrade raffle has appeared!
Donmai

[Userscript] TranslatorAssist

Posted under General

TranslatorAssist adds an additional user interface and background functions to assist a translator on Danbooru. The user interface helps out with formatting HTML and CSS (including embedded notes), it has additional controls for notes, and it provides buttons for quick insertion of many popular non-ASCII characters. It also checks for the last translator of a post, and will inform the user if another user adds notes while in translate mode, helping avoid translator conflicts.

Installation

Project page
Main script
Usage notes

Visit the following wiki for thorough usage notes.

https://github.com/BrokenEagle/JavaScripts/wiki/TranslatorAssist

Future enhancements

  • Allow custom styles to be set
  • Add control to increase/decrease the base font-size to control the size of the menu
  • Have autocomplete for styles with limited or standard input values
  • Add an editor for precisely placing absolute boxes inside a relative box
    • Along with both rotations or other transformations
  • Support multiple text shadow options with "Insertion" mode
    • E.g. could be used for a layered stroke effect
  • Allow the user interface to be opened outside of translate mode
  • Fix note previews so that it renders the same as the page load will render
  • Provide ability to sanitize and/or validate HTML/CSS
  • Provide ability to undo the last action

Final

Any suggestions or feedback is appreciated.

Latest edits

  • (2022-12-28)
    • Version 6
      • Added validate note text
      • Added undo/redo
      • Added copy note
      • Added append text shadow
      • UI can be resized
      • UI position is saved

Versions

Show
  • (2022-03-12)
    • Version 4 Initial release
  • (2022-05-27)
    • Version 5
      • Added sanitize note text
      • Added save/load inputs
      • Added delete control
      • Change which HTML tags are initializable
  • (2022-12-28)
    • Version 6
      • Added validate note text
      • Added undo/redo
      • Added copy note
      • Added append text shadow
      • UI can be resized
      • UI position is saved

Updated

Pushed Version 5. I've already updated the wiki with the latest information.

  • Additions
    • Delete HTML blocks
    • Save/Load inputs for later use
    • Sanitize HTML
      • Uses Danbooru's note sanitizer
  • Changes
    • Make all tags except for <div> and <span> uninitializable
      • I.e. when the Initialize checkbox is selected
      • The other tags can still have styles added by clicking Apply
  • Fixes
    • Hover icons for movable areas
  • Other
    • ESLINT performed

BrokenEagle98 said:

Pushed Version 5. I've already updated the wiki with the latest information.

  • Additions
    • Delete HTML blocks
    • Save/Load inputs for later use
    • Sanitize HTML
      • Uses Danbooru's note sanitizer
  • Changes
    • Make all tags except for <div> and <span> uninitializable
      • I.e. when the Initialize checkbox is selected
      • The other tags can still have styles added by clicking Apply
  • Fixes
    • Hover icons for movable areas
  • Other
    • ESLINT performed

This is what I'm waiting for. Thank you.

Pushed Version 6 and updated the wiki.

  • Additions
    • Note validation
    • Undo/redo action
    • Copy note
    • Append text shadows
      • Facilitates multiple colors/sizes/blurs
    • Resize UI
    • Reset UI size/position
    • Transform CSS setting (main section)
    • Rename/edit session inputs (load menu)
  • Changes
    • Save position/size of UI
    • Transform CSS setting changed to rotate (embedded section)
      • Since only rotate can be used on note-box-attributes
    • Last noter changed to a user link
    • Can now set whether to show the current user as the last noter
      • The default is don't show
  • Fixes
1