Skip to content

cworld1/search-switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Search Switcher

GitHub commit activity GitHub stars GitHub license

Add links to each other in search engines. Including multiple search modes.

在常用的搜索引擎页面中添加互相切换的按钮。

Screenshots

image

image

image

Download & Installnation

First you need a userscript extension on your desktop broswer, such as Tampermonkey, ScriptCat, Violentmonkey, etc.

Then click the download button below:

Download

Configs

Current support:

  • Bing
  • Google (very unstable because of A/B test)
  • Baidu
  • DuckDuckGo
  • Github
  • Bilibili
  • Yandex

If you need to edit the search supporting-list, you can edit script by yourself.

Config your sites like this:

const sites = [
  {
    // * Display name
    name: "Bing",
    // * Host name (the "@include" above should be added also)
    host: "bing.com",
    // * switcher element that neeed to insert in
    element: ".b_scopebar ul",
    // * Search link that jump to (replace keywords with %s)
    link: "https://www.bing.com/search?q=%s",
    // the key of keyword in searching links(Defaults to q if not set)
    key: "q",
    // Defaults to true if not set, hiding only disappears in the
    // jump list of regular search, panel will still be shown under the corresponding site
    enable: true,
    // Custom styles (applied to a tag)
    style: "padding: 0 10px;",
  },
  // ...
];

But don't forget to add the @include domain to make sure it works.

[!NOTE] You may need to backup site settings before you update the script.

Contributions

To spend more time coding and less time fiddling with whitespace, this project uses code conventions and styles to encourage consistency. Code with a consistent style is easier (and less error-prone!) to review, maintain, and understand.

License

This project is licensed under the GPL 3.0 License.