English - MarisKori/ComfortableSearch GitHub Wiki

This browser extension parses search results on Google and Yandex and analyzes the suggested links. If by some rule there is a coincidence with the link, then it will be modified.

Configuration File Format

It is very easy to create a configuration file - this is just csv file. That is, each line is a rule in which the components are separated by the symbol ";". For example:

color;//stackoverflow.com/;#bbffbb

  • The first component is the command (filter type). In this case, itโ€™s just the color of the link in the output.
  • The second component is the part of the URL for which a match is sought. This is a simple string (not a regular expression).
  • Other components are other parameters.

Do not edit the config.default.csv file exactly, because this is only a basic configuration. It is loaded only at the first launch of the extension and is further stored in localStorage. Therefore, open the extension settings and edit there.

Commands

replace

The format is as follows:

replace;match_str;regexp_str;replace_url

Example:

replace;//quabr.com/;^https?://quabr\.com/(\d+)/.*$;https://stackoverflow.com/questions/$1

Once the URL is matched with the second component, an additional check on the third component occurs. The third component is already a regular expression. Notice that the entire string is replaced. This means that if you want to replace the URL completely (for example, redirect to another site), the template should capture the entire URL, that is, have the form ^...$

On the other hand, if you need to replace part of the URL, this is also not a problem. Example:

replace;//ya.ru/;//ya.;//yandex. (now type in search "ya.ru" and see the replacement)

color

This is a simple color change command. The third component indicates the color, for example, #00ff00, or #0f0, or green.

hide

Also a simple command. It hides the search result. It has only two components.

Example:

hide;//html.com

(Hide all links to "html.com" in seearch results).