Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jorgenpt/webextension_pattern-rs
Rust library implementing intuitive URL pattern matching as used by Firefox & Chrome.
https://github.com/jorgenpt/webextension_pattern-rs
matching rust url webextensions
Last synced: 22 days ago
JSON representation
Rust library implementing intuitive URL pattern matching as used by Firefox & Chrome.
- Host: GitHub
- URL: https://github.com/jorgenpt/webextension_pattern-rs
- Owner: jorgenpt
- License: apache-2.0
- Created: 2021-02-15T22:11:15.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-24T03:44:13.000Z (over 3 years ago)
- Last Synced: 2024-10-03T12:34:27.960Z (3 months ago)
- Topics: matching, rust, url, webextensions
- Language: Rust
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
[![Build status](https://github.com/jorgenpt/webextension_pattern-rs/workflows/Rust/badge.svg)](https://github.com/jorgenpt/webextension_pattern-rs/actions?query=workflow%3ARust)
[![Crate](https://img.shields.io/crates/v/webextension_pattern.svg)](https://crates.io/crates/webextension_pattern)
[![API](https://docs.rs/webextension_pattern/badge.svg)](https://docs.rs/webextension_pattern)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE-MIT)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE-APACHE)# 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:- [Reference on
developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns)
- [Reference on
developer.chrome.com](https://developer.chrome.com/docs/extensions/mv2/match_patterns/)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](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license
([LICENSE-MIT](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.