4 releases
0.3.0 | Feb 24, 2021 |
---|---|
0.2.2 | Feb 18, 2021 |
0.2.1 | Feb 18, 2021 |
0.2.0 | Feb 18, 2021 |
#67 in #manifest
75 downloads per month
29KB
517 lines
webextension_pattern
webextension_pattern implements support for matching URLs with a powerful and intuitive pattern. It's simpler than regular expressions, and specifically tailored to URL matching. It's the format used by Mozilla's WebExtensions for matching URLs, as well as Google Chrome, and you can find their documentation here:
This crate aims to be compatible with Mozilla's implementation, specifically, but also supports a "relaxed" mode that does not strictly adhere, for user-friendliness.
These patterns end up looking like this:
*://google.com/foo*bar
https://*.mozilla.org/specific_path?k=1
*://*/index.php
- (relaxed mode)
*.facebook.com
License
webextension_pattern is licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~4.5–6MB
~136K SLoC