AO3: [Wrangling] Keyboard Shortcuts

adds keyboard shortcuts to the AO3 wrangling interface (modified from vaaas@github)

Автор
escctrl
Установок в день
0
Всего установок
26
Оценки
0 0 0
Версия
5.1
Создан
17.09.2022
Обновлён
02.11.2023
Лицензия
AGPLv3 - https://www.gnu.org/licenses/agpl.html
Работает на

Purpose

adds keyboard shortcuts (such as Alt+S for hitting the Save button on a form) on several wrangling-related pages

Instructions

Go to a wrangling page, e.g. your Wrangling Home. In the main menu bar you'll find a new item "Userscripts" with the option "Wrangling Keyboard Shortcuts". Selecting that will give you the dialog for choosing the sites which the shortcuts should work on, and the key combos for the different actions.

On Windows, you will want to use Alt combos, because the OS has many default keyboard shortcuts using Ctrl. On Mac, it's the other way around, and you'll find that Ctrl combos work better.

The dialog has tabs to filter the long list of available actions by page where they work on. Some actions, like "Save", work on multiple wrangling pages. You can only define one shortcut for such actions, which will apply to all wrangling pages.

If you use the same shortcut on different actions by mistake, the configuration won't save and you'll be given an error.

What is the Rel Helper?

The Rel Helper tries to split the relationship tag into its characters, puts them into individual textfields for easy editing, and gives you keyboard shortcuts to quickly reorder them, switch between / and & rels, or flip the order of their given/family names. Once you confirm your changes, the resulting text is entered into the Synonym Of textfield.

While Rel Helper is on, only its keyboard shortcuts work (Toggle Relhelper, Toggle relationship type, Flip Nameorder, Add Relhelper Line, Remove Relhelper Line, Previous, Next, Down, Up, Save); all other shortcuts are disabled.

Credit: This script was originally published by vaaas on github. Since they archived it and seem to no longer be interested on working on it, I've taken advantage of the AGPLv3 license it's published under to make several modifications fixing a few issues I noticed and adding a couple of improvements.

  • new configuration controls on which pages it should run
  • allows keybindings to be set to '' (= don't use a keyboard shortcut for this action) without breaking
  • doesn't break when no fandoms are assigned yet to a tag (when the all/none buttons aren't visible)
  • toggles between all/none buttons for fandoms and characters, when the shortcut is hit repeatedly
  • works on comments pages after leaving a new comment (when the URL is /comments?xxx instead of /tags/xxx/comments)
  • works on comment pages that already have comment threads
  • v2.0: supports digits also when pressed from a numpad
  • v3.0: added a GUI dialog for choosing the keyboard shortcuts; touching the script code is no longer necessary
  • v4.0: moved the menu item to open the GUI dialog, since I intend to put more configuration dialogs here; added tabs to the dialog
  • v5.0: added support for owlwinter's Wrangle straight from the bin script.