Discussions » Development

Adding websites based on characters in name

§
Posted: 17-11-2016

Adding websites based on characters in name

I made a script for a game that some friends play. I want to script to run in the url contains the work agar because there are so many sites. Is there a way to have it look for a word in the URL and not match the exact URL

§
Posted: 17-11-2016

See the GM documentation: https://wiki.greasespot.net/Include_and_exclude_rules: «The * serves as a wildcard that matches one or more of any character.» Using // include *agar* can be a solution, but it may be unsafe. This rule will include also any url like "https://en.wiktionary.org/wiki/agar".

§
Posted: 17-11-2016

Also, you may use regexp in @include statement, smth like

// @include  /^https?:\/\/xyz.*agar.*(\.com|\.org)(\/.*)?$/

Post reply

Sign in to post a reply.