Skip to content

Instantly share code, notes, and snippets.

@misterpyrrhuloxia
Forked from Fonger/Stylebot Pattern.md
Last active May 29, 2019 01:15
Show Gist options
  • Save misterpyrrhuloxia/59b6ebfcdd665252568b1e76eddcfaad to your computer and use it in GitHub Desktop.
Save misterpyrrhuloxia/59b6ebfcdd665252568b1e76eddcfaad to your computer and use it in GitHub Desktop.

Stylebot Patterns

stylebot.me has been down for a while. Fonger created this gist to help those who need document on pattern settings. I have forked his gist in case he ever removes it.

Basic (default)

By default, Stylebot uses simple text strings to match styles to websites. Examples:

  • docs.google.com : Matches any URL with docs.google.com in it.
  • docs.google.com, spreadsheets.google.com : Matches any URL with docs.google.com or spreadsheets.google.com in it.

Advanced

Stylebot supports wildcards **, * and ,

  • ** matches any character sequence. Examples:
    • docs**: Any URL beginning with docs.
  • * matches any character sequence, until a / is found.
    • docs*.google.com: This will match http://docs.google.com, http://docs1.google.com, http://docs2.google.com and so on.
    • *.ycombinator.com: This will match http://news.ycombinator.com and http://apps.ycombinator.com
  • , separates a list of advanced patterns. Matches a URL if any sub-pattern matches it.

Regular Expressions

Stylebot treats a string as a regex if it start it with ^. Examples: ^http://www.reddit.com/$: This matches only the Reddit homepage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment