3

GitHub - garywill/BigSearch: Browser extension. Definitly more than a GET/POST s...

 1 year ago
source link: https://github.com/garywill/BigSearch
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

English | 中文

Big Search

Handily use / switch any one or multiple (uninterruptedly) search engines (or search any websites).

Friendly to novices, satisfying to experts. For daily, entertainment & work.

Includes basic features that a multi-engine web search tool should have:

  • Built-in Google,DuckDuckGo,Youtube,eBay,Github etc
  • GET/POST
  • Custom engines

and so on. Besides above basic features, it can alsosparkles:

  • fountain_pen Single-line or multi-line text
  • keyboard Built-in Vimium-like feature. You can use keys to quickly call different search engines (details)
  • desktop_computer Desktop (browser extension / web app) and mobile (web app)
  • mag_rightEven works with websites that don't provide GET/POST interface (so-called In-page-Ajax-render websites) (see FAQ below)
  • mag_right Do many operations at once by one button. Cross-engine search calling
  • muscle User JSON programatical advanced customization (GUI easy editing also). Great flexibility in engine data & search method (details)

and so on... Go on for readme

signboard

Search everywhere world_map for everything man_technologist. Breadth & Focus.

Table of Contents

Start to Install & Use

Ways to use:

  1. Browser extension (recommended)

    • or download .crx. For: Google Chrome, Microsoft Edge, Brave, Vivaldi, Opera etc.
  2. Web App: For demo purpose. Web app can't function fully like extension. Web app can be used on mobile browsers. Main site: | Standby site:

Basic Screenshots, Demo, Video

Use Extension Breadth & Focus UI style choosable
Context selection search Different UI adaptions Vem (Vimium-like)
Edit search engines Special search methods, flexibility & extensibility

demo_gif

Video of full introduction & instructions (Youtube) (choose the chapter you want to watch):

Features

Basic

  • mag_right Use any search engines or inquery websites (multiple uninterruptedly) from one UI. Any that support GET/POST. (60+ built-in)
  • mag_rightUser custom search engine (details) (syncronizable in extension)
  • mag_right Use browser-installed search engines (browser extension, so can directly use those you've added into browser, Firefox only)
  • fountain_pen Single-line or multi-line text input & send

    Useful when e.g. want to translate article

  • card_index_dividers Search engines categorization
  • clipboard Save (locally), reuse and manage search history (won't save when in incognito mode). Reusing method: double-click behavior
    • In single-line edit: replace input box text
    • In multi-line edit: insert to cursor
  • computer_mouse Quickly use selected text (single-line or multi-line) as search term
    • No in Firefox incognito mode (bug 1380812)
    • On Chrome, after clicking context menu item, click the icon on toolbar (or use keyboard shortcut) (defect of Chrome)
  • keyboard Configurable keyboard shortcuts. Default keys (may need changing manually):
    • Open popup. Firefox: Ctrl+Alt+S Chrome & others:Ctrl+Shift+S
    • Set selected text as search term (then use "open popup" key). Firefox: Ctrl+Alt+D Chrome & others:Ctrl+Shift+D

    change on Firefox | change on Chrome: chrome://extensions/shortcuts

  • desktop_computer UI adapted multiply: Desktop (browser extension or web app) and mobile (web app only). Extention can show UI in: toolbar button popup UI, standalond tab, or sidebar (browser native. Firefox only)

Even more: What's special about it

  • keyboard Vem feature: Built-in Vimium-like feature. You can use keys to quickly call different search engines (details)
  • mag_rightEven works with websites that don't provide GET/POST interface (so-called In-page-Ajax-render websites) (details)
  • mag_right Do many operations at once by one button
  • sparkles Good-looking, powerful & lightweight (details)
  • muscle User JSON programatical advanced customization (GUI easy editing also). Both built-in & user-defined search engines data use same format (details). Great flexibility in engine data & search method:
    • black_square_buttonMultiple buttons for one engine: more than one operations for one engine. (Buttons inherit data from engine. Some key-value data ​​in button can override the ones in engine name)
    • telephone_receiverCross-engine use: Call another engine (or it's certain button action) to do the action
    • lock_with_ink_pen String-formatting or character-replacing user's input, according to engine's need. And, charset specifying.
    • mag_right Combining above two to search websites that don't provide search

Vem feature (built-in Vimium-like)

If you've used !bang or omnibox, they require you to memorize codes.

While, Big Search's Vem mode visually gives you convinience & ability to use keyboard to (uninterruptedly) click different search engines' different buttons. Press Shift+Enter to enter Vem mode

vem
Key Function
Shift+Enter Finish input and enter Vem mode (used when not in Vem mode)
Shift+Enter Opposite to above (used when in Vem mode)
I Quit Vem mode and focus inputbox
1 - 9 Switch catagory (in Vem mode)
A - Z Press corresponding button (in Vem mode)
J & K Scroll table down/up
more to be added ...

Above key bindings are not formally determined. May change in the future according to user feedback

Note if new engines added, button sequence may change, so as button key (A - Z).

Safety & Privacy

  • shield Minimum default permissions. Won't ask for sensitive permissions until needed.
  • shieldNo injection to web (except when searching In-page-Ajax-render websites)
  • shield Hide HTTP Referrer by default to protect user privacy
  • shieldClient side functions and includes data fully. No necessary 3rd-party server. Completely no collecting user data
  • shield User custom engine GUI editor is used online (to shrink extension size). If you want extreme security, you can choose to disable communication between them, and use manual edit.

Q: I selected text and used context menu, it won't automatically show popup until I click toolbar button (on some browsers like Chrome)

A: It's because of defect of Chrome browser engine. Please use key combination Ctrl+Shift+D then Ctrl+Shift+S (you may want to modify them) as workaround

Q: What is "In-page-Ajax-render" ?

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 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, then your browser renders them on 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 token assigned at a search entrance form.

"In-page-Ajax-render" is short for "In-page-submit-form-via-Ajax-then-XHR-gets-search-result-then-render-and-show-in-page-without-web-frame-navigation"

This part is also explained in the video description

List of engines

60+ , currently. See list of build-in search engines

Similar tools & methods comparison

Comparison of open source web searching (multi-engines) tools

Experienced users may prefer intuitive horizontal comparison to quickly know what's special. (Also know about others btw)

How to edit search engines (GUI or JSON)

Online GUI engine-editing tool (link 1) (link 2) (link 3)

Generally, use above GUI editor. If you don't want to use GUI (e.g. you are advanced user and want to use advanced features), please go on and read below.

Big Search users can edit search engines programatically. Following paragraphs of this section are about JSON-format engine data specification. For both:

  1. User-defined private engines
  2. Big Search built-in search engines (enginesdata.js)

Examples

Short Format

You only need to write very simple JSON and have basic HTTP knowledge on GET Method.

{
    "Google": "https://www.google.com/search?q={0}",
    "Yahoo Search": "https://search.yahoo.com/search?q={0}"
}

More about short format

{
    : {
        : ,
        : 
    }
}

Full Format

Using full format you have opportunity to use all the features of this tool.

Also, mixing short formatted and full formatted elements is supported.

Full format examples

{
    : {
        : ,
        : ,
        : ,
        : 
    },

    : {
        : ,
        : ,
        : ,
        : ,
        : {
            : {
                : 
            },
            : {
                : ,
                : [
                    {:, : }
                ]
            }
        }
    },

     : { :  },
    : {
        : ,
        : ,
        : {
            : {
                : ,
                : ,
                : {
                    : ,
                    : 
                }
            }
        }
    },

    : { :  },
    : {
        : ,
        : ,
        : ,
        : 
    },

    : { :  },
     : {
        : ,
        : {
            : {
                : ,
                : [, ]
            }
        }
    }
}

Specification of Editing Engines Data and Special Search Methods

Specifications

In JSON format.

Engine data in full format can contain following key-values (special search methods included):

Specifications



    : 
        : 
        : 
        : 
        
        : 
        
        
        : 
        
        : 
        
        : 
        
        : 
        
        : 
        
        : 
        : 

        
            
            
            
        
        
        : 
            : 
            : 
            :    
            
        
        
        
        : 
            
        : 
            : 
                : 
                : 
                
                 
            
            
        
    

Instructions for searching In-page-Ajax-render websites

Some websites doesn't provide GET/POST search (or not respond results in HTML). Visitor need to open their page then input, they then show results via Ajax on their page. (see FAQ)

Big Search can deal with such In-page-Ajax-render websites (by injecting js to your browser web, to automate inputting, clicking, form submitting). And easy to configure:

Eg 1: Specify the css selector 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"]

This part is also explained in the video description

For Developers

We encourage user to submit their customized search engines data to source code after they format as JSON (submit to file enginesdata.js). Search engines data is AGPL licensed FLOSS.

What's Next Step

This tool still can be improved to do something more:

  • Omnibox
  • Be compatible with others e.g. OpenSearch. Add or convert by 1-click

Technical Diagram

Third-party libraries and components used

Fast and lightweight: NO heavy framework or library dependencies. Although it has UI themes of both simplicify & fancy, all main features and UI are pure JS + CSS.

Globalization

History, Code Status, and License


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK