Skip to content
This repository was archived by the owner on Aug 10, 2023. It is now read-only.

Commit b1865c6

Browse files
committed
get simple example working
1 parent 8277c1a commit b1865c6

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# search-suggestions
2+
23
Example showing off adding search suggestions to Gmail's autocomplete.

content.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
InboxSDK.load(1, 'search-suggestions').then(function(sdk) {
2+
sdk.Search.registerSearchSuggestionsProvider(function(query) {
3+
4+
return [
5+
{
6+
name: 'Search Google for: "' + query + '"',
7+
externalURL: 'https://www.google.com/#q=' + query
8+
},
9+
{
10+
name: 'Search Bing for: "' + query + '"',
11+
externalURL: 'https://www.bing.com/search?q=' + query
12+
}
13+
];
14+
});
15+
});

inboxsdk.js

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

manifest.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "Search Suggestions - Example Gmail Extension",
3+
"description": "Example extension showing use of the InboxSDK adding results to Gmail's autocomplete",
4+
"version": "0.1",
5+
"content_scripts": [
6+
{
7+
"matches": [
8+
"https://mail.google.com/*",
9+
"https://inbox.google.com/*"
10+
],
11+
"js": ["inboxsdk.js","content.js"],
12+
"run_at": "document_end"
13+
}
14+
],
15+
"permissions": [
16+
"https://mail.google.com/",
17+
"https://inbox.google.com/"
18+
],
19+
"manifest_version": 2
20+
}

0 commit comments

Comments
 (0)