Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garywill/6cf6de2268880e5c93365f2e03c4a764 to your computer and use it in GitHub Desktop.
Save garywill/6cf6de2268880e5c93365f2e03c4a764 to your computer and use it in GitHub Desktop.

Today I am telling about another multiple-search-engines browser extension BigSearch (source code on Github), which can do more than other similar tools.

Did you know, GET/POST are not enough in browser web search

I - Add some search engines to browser search bar - GET method

Bob wants to add many websites to his browser search bar. Some are added, but the browser search bar supports only GET (HTTP GET)

II - Add more search engines - POST method

Bob installs some browser extensions, now he can also add POST. Bob happy.

But then, Bob finds some websites are "neither GET nor POST". The form must be submitted in page, then the page fetchs and displays results via Ajax. All in-page.

Your browser can't just open a new tab and send a GET/POST and wait for HTML response for those websites.

Bob fails to add such websites to browser search bar

III - Today here's this extension supporting "In-page-Ajax-render"

Finally Bob meets me. I tell him here is a new extension that can add such "neigher-GET-nor-POST" websites to browser as search engine.

I call those websites "In-page-Ajax-render websites" (short for "In-page-submit-form-via-Ajax-then-XHR-gets-search-result-then-render-and-show-in-page-without-web-frame-navigation")

Now let me introduce this helpful tool

BigSearch (Github) - browser extension for web search. Quick and flexible.

BigSearch supports GET + POST + In-page-Ajax-render 3 different methods.

The general GET/POST search flow is:

  1. You input search term and click search button
  2. Your browser loads the search term into a GET/POST query then sends it to target URL you specify
  3. Your browser opens a new tab and loads the HTML responded by the target website

Big Search's In-page-Ajax-render search is:

  1. You input search term and click search button
  2. Your browser opens the target website page you specified (search term not sent)
  3. Big Search injects a simple JS to the page, filling your search term into the text box on page (according to css selector you specified). Then JS triggers clicking the submit button (also according to css selector you specified) action
  4. The website page itself then uses Ajax to fetch search results, and your browser renders them on the page

The In-page-Ajax-render search feature can be used to search websites that do not provide GET/POST search interface to public (e.g. SPA websites), or those who require random tokens from their entrance page.

Not just that. Many other features, ready for daily and work use.

(GET & POST are HTTP protocol methods, while Ajax isn't. Ajax is also based on GET or POST. But that's not the reason treat In-page-Ajax-render as a "search method")

BigSearch's UI looks just like a general daily search start page:

en Technical diagram:

(look at the right side, not just GET/POST. It can inject js to browser web, to automate in-page form-submitting, text-inputting, button-clicking processes) techdiagram

Is it hard to adapter my search engines data for those "Ajax-render" websites in Big Search?

No, just simply use web elements' css selector.

Eg 1: Specify the querySelector of input box. It will automatically input search term and trigger pressing Enter event.

"ajax": "#search-box-input"

Eg 2: Delay 2s -> Input -> Delay 1s -> Trigger clicking button event

"ajax": [2000, "#search-box-input", 1000, "#submit-button"]

Above JSON-format editing can be used for both:

  1. User-defined private engines
  2. Big Search built-in search engines

Besides above, Big Search can also

  • Single-line or multi-line text
  • Desktop (browser extension / web app) and mobile (web app)
  • Do many operations at once by one button
  • JSON as search engines database (both built-in & user-defined. GUI editing also available). Flexibility & extensibility in engine data & search method

and so on...

Gif demo of daily use

demogif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment