AO3: [Wrangling] Search Term Highlighting

highlights the search terms in the results

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
escctrl
今日安裝
0
安裝總數
12
評價
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.