Skip to content

pirxpilot/cse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Google custom search engine on your page

Resources

License

Stars

Watchers

Forks

Packages

No packages published