Modify URLs in search results of search engines
当前为
Github Repo: https://github.com/domeniczz/URL-Modifier-for-Search-Engines
Codeberg Repo: https://codeberg.org/Domenic/URL-Modifier-for-Search-Engine-Results
Please give me a star on Github or Codeberg if you like this script!
This Tampermonkey script enhances your search engine usage by modifying URLs in the search result of search engines, redirecting to alternative sites. Allows a more customized and efficient browsing experience.
URL modification uses Regular Expression.
ATTENTION: Remember to backup your custom configuration in case script update will overwrite all your modification! Or, you could create an issue on Github to add your configuration into the script.
You can manually add DOM selector in the code to support other search engines.
Can't support Bing, because it only provide intermediate links.
You can add custom redirection rules into the script yourself.
Other alternatives privacy friendly frontends, see:
URL modification rules in regular expression
| Variable | Description |
|---|---|
| matchRegex | regular expression for matching original URLs |
| replaceWith | regular expression for replacement |
Selector rules for the DOM elements needs updating for search engine results
| Variable | Description |
|---|---|
| selector | selector for DOM element |
| updateText | flag for whether to update the text or href value of the element |
| childSelector | selector for child DOM element under parent element |
| updateChildText | flag for whether to update the inner text of the child element |
| containProtocol | flag for whether to contain protocol (e.g. https://) in the domain |
| displayMethod | required, URL display method method 1: breadcrumb format method 2: full URL method 3: full URL without protocol |
| multiElementsForUrlDisplay | flag for whether the displayed URL is separated into multiple DOM elements |
| hasSubResults | flag for whether the search engine can have sub-results |
| subResultSelector | selector for sub-results |
User-defined list of search engine domains
| Variable | Description |
|---|---|
| hosts | search engine's domain |
| resultContainerSelectors | optional, set search result container DOM, to narrow down the range of dynamic observation |