Google Chrome Extension – Omgili Search, an Omnibox extension

Google Chrome Omnibox Search extension that enables you to search Omgili (omgili.com) from the Omnibox.  To use, simply type ‘omg’, a space, and your search query into the Omnibox, then choose a time frame from the drop down, and it will open your search results up in a new tab. Omgili is a time sensitive international message board search engine (in case you didn’t know).

manifest.json


{
	"name" : "Omgili Search",
	"short_name": "omg Search",
	"description" : "To use, type 'omg' & space, and a query term into the Omnibox. timothytocci.com",
	"version" : "0.1",
	"background" : {
		"scripts" : ["background.js"]
	},
	"omnibox" : {
		"keyword" : "omg"
	},
	"icons" : {
		"16" : "omg_16.png",
		"32" : "omg_32.png",
		"48" : "omg_48.png",
		"128" : "omg_128.png"
	},
	"manifest_version" : 2
}

background.js


chrome.omnibox.onInputChanged.addListener(function (text, suggest) {
	suggest([{
				content : encodeURIComponent(text) + "&tf=day",
				description : "Search Omgili in the past day (default)"
			}, {
				content : encodeURIComponent(text) + "&tf=week",
				description : "Search Omgili in the past week"
			}, {
				content : encodeURIComponent(text) + "&tf=month",
				description : "Search Omgili in the past month"
			}, {
				content : encodeURIComponent(text) + "&tf=year",
				description : "Search Omgili in the past year"
			}, {
				content : encodeURIComponent(text) + "&tf=any",
				description : "Search Omgili with no time frame"
			}
		]);
});
chrome.omnibox.onInputEntered
.addListener(function (text) {
	var createProperties = {
		url : "http://omgili.com/search?q="
		 + text
	};
	chrome.tabs.create(createProperties);
});
chrome.omnibox.onInputStarted
.addListener(function () {
	var suggestion = {
		description : "Omgili Message Board Search query: %s "
	}
	chrome.omnibox.setDefaultSuggestion(suggestion);
});

Install Omgili Search Extension (chrome store)

Advertisements

2 thoughts on “Google Chrome Extension – Omgili Search, an Omnibox extension

  1. Amazing things here. I am very satisfied to peer your post.

    Thanks a lot and I’m looking ahead to contact
    you. Will you please drop me a mail?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s