AO3: [Wrangling] Search Term Highlighting

highlights the search terms in the results

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
escctrl
日安装量
0
总安装量
13
评分
0 0 0
版本
6.1
创建于
2024-07-28
更新于
2024-11-04
大小
7.2 KB
许可证
MIT
适用于

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.