How to add “Search in site” as a search engine

Tip bulb

You can add a “Search in site” option in your search engine list by following the directions below:

  1. From the Tools menu, click Maxthon setup center
  2. Open the Search page from the sidebar on the left
  3. Add a new search engine by clicking the Add Item link, type anything in the title and the alias fields, but in the URL field add:
  4. javascript:var root=location.hostname;var URL="http://www.google.com/search?hl=en&q=site:"+root+"+%us";location.href=URL;

  5. Save your settings, the new search engine would appear in the search bar menu.
  6. Now you can type anything in your search bar, select this search engine, and the currently opened site will be searched for your keyword in Google.

As you see, the URL field can handle javascript, making complex search engines strings possible, you can extend it as you like of course.

Thanks to sleek, “R” and JarC for originally posting this tip in the forum

Advertisements

6 thoughts on “How to add “Search in site” as a search engine

  1. Excellent tip! I tend to rely on the Super Search plugin (which I’ve heavily customised), but having the ability to use all-keyboard searching is a definite plus.

  2. dear sir,
    i need help for this
    if i need that search engine is
    google image search engine as defaut
    how do i to set?

    i really need it…thanks for help

  3. Hi Adam,
    If you mean you want to search in site using Google images you can use this code instead:
    javascript:var root=location.hostname;var URL=”http://images.google.com/images?hl=en&q=site:”+root+”+%us”;location.href=URL;
    The steps above still apply.

    But if you would like to have Google images as a Search engine generally (not in the current website) you can use this text in the url field:
    http://images.google.com/images?hl=en&q=%us

    Hope that helps…

  4. thanks to Mamoun
    i got it
    another this can u teach me how do i know
    the way to do this

    example, i need mp3 search engine at http://www.sogou.com
    how do i know the search engine root???

    thanks to share

    u really help me on this…..thanks friend.

    p/s:
    i’m not understand this
    URL=”http://images.google.com/images?hl=en&q=site:”+root+”+%us”;location.href=URL;

    is means i put all or either one…..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s