Aggregated Searcher
Customizable, themeable, mobile-friendly search engine aggregator script for Tampermonkey.
Install the Tampermonkey browser extension, then click one of the links below to install the script:
Currently, the script supports the following search engines:
Clone the repository and install the dependencies:
git clone https://github.com/Jkker/metasearch-tampermonkey.git
cd metasearch-tampermonkey
pnpm install
To build the script, run the following command:
pnpm run build
The build process is configured in vite.config.ts. It includes two plugins: libInjectCss for CSS injection and prependUserScriptHeader for prepending a UserScript header.
Open src/config.ts and edit the config object to your liking. The config object is a map of search engine names to search engine objects. Each search engine object has the following properties:
Engine Propertiesname: stringThe name property represents the name of the engine.
url: stringThe url property specifies the URL associated with the engine.
deeplink?: string (optional)The deeplink property is an optional URL scheme for opening the engine URL in native apps on mobile. If omitted, the url property is used instead.
matcher?: string | RegExp | ((url: string, query: URLSearchParams) => boolean) (optional)The matcher property determines how the current URL matches the engine. It can be of type string, RegExp, or a function. The undefined value implies that the engine is skipped during matching. By default, it is undefined.
string: Matches if the URL contains the specified string.RegExp: Checks if the URL matches the regular expression.function: Returns true if the URL matches the function's criteria.q?: string | string[] | RegExp | ((url: string, query: URLSearchParams) => string) (optional)The q property represents the query parameter used for searching. It can be a string, string[], RegExp, or a function. By default, it is set to 'q'.
string: The query parameter is used as the search query.string[]: The first found query parameter is used as the search query.RegExp: The first matching query parameter is used.function: Calls the function with URL and query parameters, using the return value as the search query.key: stringThe key property is a unique ASCII string for identifying the engine and for keyboard shortcuts.
icon: stringThe icon property defines the icon for the engine.
color: stringThe color property specifies the foreground color for the engine.
background?: string (optional)The background property, optional, defines the engine's background color.
lightness?: number (optional)The lightness property, optional, determines the lightness of the engine, affecting the text color (dark or light). The default value is 0.5 or computed from the color property.
priority: numberThe priority property signifies the engine's display priority. Higher values result in earlier display in lists. The default value is calculated as index * 0.1.
disabled?: boolean (optional)The disabled property, if set to true, hides the engine from the list. By default, it is false.
Engine ExampleBelow is an example of how to use the Engine interface:
const searchEngine: Engine = {
name: 'ExampleEngine',
url: 'https://example.com',
deeplink: 'example://search',
matcher: (url) => url.includes('example.com'),
q: 'query',
key: 'example',
icon: '<svg>...</svg>',
color: '#FF5733',
background: '#FFFFFF',
lightness: 0.7,
priority: 2,
disabled: false,
};
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.