AO3: [Wrangling] Search Term Highlighting

highlights the search terms in the results

Autor
escctrl
Instalaciones diarias
0
Instalaciones totales
8
Calificaciones
0 0 0
Versión
6.1
Creado
28/7/2024
Actualizado
4/11/2024
Licencia
MIT
Funciona en

Adds a "Highlight Search Terms" button at the top of the search results, to highlight where in the results the search term(s) are contained.
When I was a newbie wrangler, this helped me better understand the search logic of AO3, and why I was seeing the results I was getting. It helps focus the eye when tags are chatty or when a lot of partial matches are being pulled in.

Works on the original Search page, as well as with my script that can turn the results into a table.

The STRICT_HIGHLIGHT configuration at the beginning of the script changes the behavior of the highlighting with special characters a little, when the search term didn't include asterisk:

  • false = like AO3 searches by ignoring special characters
  • true = as you probably meant it, by searching for the literal special character

Examples using a search term of "sugar & spice" in quotation marks, without asterisk. Ao3 search ignores the ampersand in the middle.

I cannot guarantee it will work 100% of the time since the script takes a somewhat simplified approach to reverse-engineering the search matching of AO3 ^_^ Please let me know of specific examples where it behaves weirdly and I'll happily look into it.