cse

1.0.4 • Public • Published

cse

Use Google custom search engine on your page.

See in the wild on the American Scenic Byways website - source.

Installation

Install with npm:

$ npm install cse

API

You need to create custom search engine and obtain search engine ID whithc looks like this: 012345678901234567890:abcdefghijk

Add #cseSearchBox or #cseSearchResults (or both) to your HTML and then initialize them with google's magic.

var cseID = "012345678901234567890:abcdefghijk";
require('cse')(cseID);

If neither #cseSearchBox nor #cseSearchResults are found we die silently without trying to load any scripts from google.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i cse

Weekly Downloads

3

Version

1.0.4

License

MIT

Last publish

Collaborators

  • pirxpilot