AO3: [Wrangling] Mark Illegal Characters in Canonicals

Warns about any canonical tag that includes characters which should, per guidelines, be avoided. Checks on new tag, edit tag, search results, wrangle bins, and tag landing pages

Устаревшая версия за 29.07.2023. Перейдите к последней версии.

Автор
escctrl
Оценки
0 0 0
Версия
1.0
Создано
29.07.2023
Обновлено
29.07.2023
Размер
13,2 КБ
Лицензия
MIT
Работает на

This script flags canonical tags, if they include any characters that shouldn't be used, per wrangling guidelines.
It checks fandom canonicals differently, since those may contain other language scripts for the original fandom titles.

The pages and tags checked are:

  • New Tag: Checks as you type, and also warns if you're exceeding 100 chars. If Fandom is selected as the tag type, the checker switches to the fandom-specific allowed characters
  • Search Tag: Checks all canonicals in search results. Works both in vanilla search and with the script turning results into a table
  • Tag landing page: Checks the viewed tag itself (if canonical) as well as all metatags and subtags listed on the page. Does NOT check Parent tags.
  • Edit Tag: Checks the viewed tag itself (if canonical, or if you're checking the checkbox to make it canonical), the canonical it's synned to, all fandoms, metatags, subtags, and linked characters.
  • Wrangle pages in a bin: In the table, checks the tag (if canonical), and any listed canonical it's synned to, metatags, subtags, and linked characters.

Allowed Characters:

  • All tags: latin letters, latin numbers, space, hyphen, dot, brackets, forward slash, ampersand, pipe, single quote, double quote.
  • Additionally, although guidelines says to avoid them, because they're often in use: colon, exclamation mark.
  • Additionally in fandom tags: any script letter, any script number, any script tone mark, hash, question mark, underscore.

Additionally it'll warn if two single quotes '' are used instead of a double quote ", and if the tag has a space at the beginning or end.
If I forgot anything, please don't hesitate to contact me and I'll update the regex.

If you'd like to disable checks on a particular page, you can comment out (add two forward slashes // at the beginning of the line) the corresponding line, at line#21 through line#25.