Google Chrome Extension – Mozilla Open Directory (dmoz.org) Search, an Omnibox extension

Google Chrome Omnibox Search extension that enables you to search Mozilla Open Directory (dmoz.org) from the omnibox.  To use, simply type ‘dmoz’, a space, and your search query into the omnibox and it will open your search results up in a new tab.

From dmoz.org – “The Open Directory Project is the largest, most comprehensive human-edited directory of the Web. It is constructed and maintained by a vast, global community of volunteer editors.”

manifest.json


{
	"name" : "Mozilla Open Directory Project Search",
	"short_name": "dmoz Search",
	"description" : "To use, type 'dmoz' & space, and a query term into the Omnibox. timothytocci.com",
	"version" : "0.1",
	"background" : {
		"scripts" : ["background.js"]
	},
	"omnibox" : {
		"keyword" : "dmoz"
	},
	"icons" : {
		"16" : "dmoz_16.png",
		"32" : "dmoz_32.png",
		"48" : "dmoz_48.png",
		"128" : "dmoz_128.png"
	},
	"manifest_version" : 2
}

background.js


chrome.omnibox.onInputEntered.addListener(function (text) {
	var createProperties = {
		url : "http://www.dmoz.org/search?q="
		 + encodeURIComponent(text)
	};
	chrome.tabs.create(createProperties);
});
chrome.omnibox.onInputStarted
.addListener(function () {
	var suggestion = {
		description : "Search Mozilla Open Directory Project (dmoz) for the query: %s "
	}
	chrome.omnibox.setDefaultSuggestion(suggestion);
});

Install Mozilla Open Directory Search Extension (chrome store)

Advertisements

One thought on “Google Chrome Extension – Mozilla Open Directory (dmoz.org) Search, an Omnibox extension

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