AO3: [Wrangling] Rainbow Tables

adds CSS classes to style table rows as a rainbow, and updates dynamically when filters are applied

Autor
escctrl
Installationen heute
0
Installationen gesamt
46
Bewertungen
0 0 0
Version
6.0
Erstellt am
31.05.2022
Letzte Aktualisierung
23.03.2025
Größe
5,91 KB
Lizenz
MIT
Wird angewandt auf

💖 What it does

Creates striped table rows on your Wrangling Homepage, in the Bins, and on Tag Search results.

example view of the Wrangling Home Page table in rainbow colors

The stripe colors update dynamically as the content of the tables changes, such as with a fandom filtering script, or with a snooze script.

🪴 How to use it

After installing the script, by default, the tables will appear in six colors in a rainbow configuration.

In order for Tag Search results to appear in colored tables, you also have to install the Action Buttons Everywhere script and enable it to turn search results into a table.

You can pick different colors, whether to define them within the script, or in your Ao3 Site Skin, and on which pages you'd like the color stripes to appear.

🎨 How to configure it

This script does not have a configuration GUI, so all changes must be made in the code.

  • ONHOMEPAGE, ONBINS and ONSEARCH let you choose on which page(s) you want the table rows to appear in colored stripes.

  • SOURCE defines where the color configuration should be used from:

    Set it to SOURCE = "script" if you want to use the options within the script:

    • RAINBOW ... the six background colors for the rainbow effect
    • TEXT ... the text color in those table rows
    • BORDER ... the color of the borders inside the table
    • HIGHLIGHT ... the color of the table row on mouse hover

    Set it to SOURCE = "skin" if you have the six CSS classes .rainbow0 through .rainbow5 defined in your Archive Skin instead. That allows you to align them with different colorschemes, or for different devices. For example:

    .rainbow0 {
      background: rgba(246, 48, 63, 0.2);
    }
    .rainbow1 {
      background: rgba(241, 137, 4, 0.2);
    }
    .rainbow2 {
      background: rgba(253, 221, 0, 0.2);
    }
    .rainbow3 {
      background: rgba(119, 189, 30, 0.2);
    }
    .rainbow4 {
      background: rgba(1, 152, 207, 0.2);
    }
    .rainbow5 {
      background: rgba(114, 32, 130, 0.2);
    }

🐞 Known limitations and cross-compatibility

If you're using the tag snooze script, it may take a moment to run and hide table rows. This script has a delay built in for that purpose when re-applying the rainbow colors, but if you notice that the rainbow colors don't update into the proper order of 6 after snoozing/unsnoozing tags, you can increase the numbers on lines #89 and #91 (tip: increase in steps of 100). Inversely, if the snoozing runs fast and you're noticing a huge lag until the new colors show up, you can try decreasing those numbers, too.

🌱 Upcoming features and bugfixes

  • configuration GUI

🏛️ History

  • v6 - rainbow colors for search result tables
  • v5
    • rainbow colors for bin tables
    • script compatability improvements
  • v4 - supports Sort Fandoms by Number of Unwrangled Tags script
  • v3 - update to reflect recent Ao3 code change
  • v2 - allows color configuration within script
  • v1 - rainbow colors in Ao3 Skin for Wrangling Home Page table