Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Stylebot Patterns

stylebot.me has been down for a while, so I create this gist to help those who need document on pattern settings.

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 https://docs.google.com, https://docs1.google.com, https://docs2.google.com and so on.
    • *.ycombinator.com: This will match https://news.ycombinator.com and https://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: ^https://www.reddit.com/$: This matches only the Reddit homepage.

@kelicia

This comment has been minimized.

Copy link

@kelicia kelicia commented Apr 5, 2019

THANK YOU!! Been wondering how to get the patterns working!

@rmaenk

This comment has been minimized.

Copy link

@rmaenk rmaenk commented Dec 9, 2019

Thanks

@danclegg

This comment has been minimized.

Copy link

@danclegg danclegg commented Feb 21, 2020

I think two comments isn't quite enough, so here's another -- Thank you!

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