From 31143c42eee5c04f4e61276ff57eb0455212c7bd Mon Sep 17 00:00:00 2001 From: attero Date: Mon, 4 Nov 2019 21:40:27 +0100 Subject: README.md: fixed !bang RegEx, added !ghh example --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 492ffec..8a31b7f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ * [Google Chrome and Vivaldi](https://chrome.google.com/webstore/detail/redirector/ocgpenflpmgnfapjedencafcfakcekcd) * [Opera](https://addons.opera.com/extensions/details/redirector-2/) - ## Examples ### De-mobilizer - Example URL: `https://en.m.wikipedia.org/` @@ -36,16 +35,27 @@ What are bangs?: #### DDG !example Base - Example URL: `https://duckduckgo.com/?q=!`__example__`&get=other` -- Include pattern: `^(?:http?s://)duckduckgo.com/\?q=([^\+])?(?:%21|!)`__example__`([^\+]|$)` +- Include pattern: `^(?:http?s://)duckduckgo.com/\?q=(?:%21|!)`__example__`(?=\&|$)(?=\W|$)` - Redirect to: `https://example.com/` +- Pattern type: Regular Expression - Description: redirect to the base site when bang is the only search parameter #### DDG !example Search - Example URL: `https://duckduckgo.com/?q=searchterm+!`__example__`+searchterm2&get=other` -- Include pattern: `^(?:http?s://)duckduckgo.com/\?q=(.*\+)?(?:(?:%21|!)`__example__`\+?)(.*?(?=\&))` +- Include pattern: `^(?:http?s://)duckduckgo.com/\?q=(.*\+)?(?:(?:%21|!)`__example__`)(?:\W|$)((\w|\+)*)` - Redirect to: `https://example.com/?query=$1$2` +- Pattern type: Regular Expression - Description: redirect to custom site search +##### !ghh git-history +- Example URL: `https://duckduckgo.com/?q=!ghh+https%3A%2F%2Fgithub.com%2Fbabel%2Fbabel%2Fblob%2Fmaster%2Fpackages%2Fbabel-core%2FREADME.md&adfasfasd` +- Include pattern: `^(?:http?s://)ad.doubleclick.net/.*\?(http?s://.*)` +- Redirect to: `https://$1.githistory.xyz$2` +- Pattern type: Regular Expression +- Description: +- __Advanced:__ + - Process matches: URL decode + ## Dark theme If you are a Firefox user and use a dark theme, you can edit your userChrome.css file and add these lines to it for the extension button to more visible: -- cgit v1.2.3