Open ahegaofish opened 7 years ago
You should use the @match
directive instead of @include
, with an argument of the form *://example.com/*
.
See the documentation (GM's @match
directive is compatible).
I'd suggest to put up a pull request with the changes instead of pasting that in an issue, but since the whole change would be quite big, I don't expect it to be accepted at face value. Switching to @match
directives as websites break with each fix being actually verified would be better. Smaller diffs in pull requests are also easier to manage :)
@anka-213 do you see any reason not to start switching to @match
instead of @include
directives? That directive has been available in GM since mid 2011, so I don't think that compatibility is an issue at this point. There is no fancy-pantsy @include
using a regex (we could still keep those anyway, as we would keep excludes), and IMHO the documentation for @match
is also a lot better than the doc of @include
.
@crazygolem I did not know about @match
, so no, I see no reason not not to switch. Also:
The @match metadata imperative is very similar to @include, however it is safer. It sets more strict rules on what the * character means.
I was a bit worried that switching to *
everywhere would make the match too wide, but that seems to be resolved if we use @match
instead.
because there are a lot of sites that are only http or https that have changed why not just use asterisk for every link? Like so
I just did a notepad replace and then manually searched for the screw ups but that should be about right.