AO3: Reorder Tags with Drag & Drop

drag & drop tags into the order you'd like before posting

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Aŭtoro
escctrl
Ĉiutagaj instaloj
0
Tutaj instaloj
347
Ratings
3 0 0
Versio
3.0
Kreita
2023/09/03
Ĝisdatigita
2025/12/30
Size
14,1 kb
Licenco
MIT
Aplikiĝas al

💖 What it does

On AO3, the order you're adding tags (fandoms, characters, relationships, additional tags) to your work determines the order they show up on your work once you save it. If you think of a tag late and want this to be the first tag, you'd have to delete and re-add all tags. No more!

With this script, each new tag becomes draggable: Once you have added all tags, you can just drag & drop them into the order you want.

an animated GIF showing an example of a New Work form. A previously saved character tag is fixed, with a pushpin icon. Two more character tags are 'draggable'. A mouse pointer grabs onto the last tag, and drags it across the screen, causing it to switch places with the other draggable tag.

That is, until you saved your work/draft...

🪴 How to use it

Draggable Tags

Before you save the work or the draft, the tags you enter are "draggable".

Click and hold the tag, drag it across the screen (it will slot between the other draggable tags as you go), and finally drop the tag into the spot you want it to be.

You can "Preview" your work - but if you want to go back to continue changing tags, please use the  ⇦  back button in your browser. Unfortunately AO3 does some weird things that I can't really work around, which means that using the "Edit" button on the Preview page stops the script from working.

Ordering Fixed Tags

Tags which were already saved in a particular order (if you posted your work or saved your draft previously) are fixed in place by AO3 and cannot be re-ordered. Such tags are shown with a pushpin icon, and a mouse-over text tells you that this tag isn't sortable. The only way to re-order fixed tags is to delete them, save the work/draft, and re-add them. While re-adding, you can use the drag & drop feature of this script.

To help with that task, the script adds Copy and Delete buttons to the labels.

  1. Select the Copy button (two stacked rectancles icon).
  2. A comma-separated list of these tags is now in your clipboard. Paste them in a notepad application somewhere for later.
  3. Select the Delete button (trash bin icon) to remove all tags under this label.
  4. Repeat steps 1-3 for any label where you need to re-order fixed tags.
  5. "Post" the work or "Save Draft". (not Preview!)
  6. Go back to editing the work/draft.
  7. Copy the comma-seperated lists of tags from your notepad into the proper tags textboxes, and press the Enter key.
  8. Now the tags are sortable. Drag & drop them into the order you want.
  9. Post the work/save the draft again.

🎨 How to configure it

Fixed tags have a pushpin icon. In addition, you can highlight fixed vs. draggble tags with background colors for easier distinction:

  1. Go to the Post > New Work page.
  2. You'll have a new "Userscripts" option in the main menu bar. Select "Reorder Tags" from it. This opens the configuration GUI.
  3. Toggle "Use colors on tags" on.
  4. In the four input fields, some colors are selected by default. You can change them via the colorpickers.
  5. Select "Save".
screenshot of the configuration dialog with a toggle option and four colorpickers

Selecting "Reset" in the config dialog deletes all stored values and disables the color-highlights.

🐞 Known limitations

Using the "Edit" button on the Preview page stops the script from working! You can preview your work - but if you want to go back to continue changing tags, please use the  ⇦  back button in your browser.

When enabling the background colors, the script adds a bit of CSS padding to the tags so it displays nicely in the AO3 default site skin. If you have a custom skin, this may interfere a bit. You can always adjust your custom skin (for #work-form li.added.tags and #work-form li.added.tags.fixed) to override those padding values again.

🏛️ History

  • v3
    • switch to Sortable.js
    • more minimal look (removed handles, less padding, option for no colors)
    • configuration GUI to choose highlight colors
  • v2
    • mobile support
    • improvements to survive a page refresh
  • v1 - drag & drop on desktop browsers