1.0.4 • Published 7 years ago

cse v1.0.4

Weekly downloads
25
License
MIT
Repository
github
Last release
7 years ago

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

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

8 years ago

1.0.1

8 years ago