Crates.io | webextension_pattern |
lib.rs | webextension_pattern |
version | 0.3.0 |
source | src |
created_at | 2021-02-18 07:51:39.35295 |
updated_at | 2021-02-24 22:10:50.937793 |
description | Intuitive URL pattern matching as used by Firefox WebExtensions and by Chrome |
homepage | https://github.com/jorgenpt/webextension_pattern-rs/ |
repository | https://github.com/jorgenpt/webextension_pattern-rs/ |
max_upload_size | |
id | 356940 |
size | 42,335 |
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
webextension_pattern is licensed under either of
at your option.
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.