Browser Extension, Google Chrome, Javascript, Mozilla-Open-Directory-Search

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)

Advertisement
Standard