Browser Extension, Google Chrome, Google-Open-Storage-Search, Javascript

Google Chrome Extension – Google Open Storage Search, an Omnibox extension

Adds Open Storage Search functionality to Google Chrome, Chromium, and Comodo Dragon.

manifest.json

{
"name": "Google Open Storage Search",
"description" : "To use, type 'gos' & space, a filetype & space plus a query term into the Omnibox. timothytocci.com",
"version": "0.1",
"background": {
"scripts": ["background.js"]
},
"omnibox": { "keyword" : "gos" },
"icons" : {
"16" : "google.png",
"32" : "peopleicon32.png",
"48" : "peopleicon48.png",
"128" : "peopleicon128.png"
},
"manifest_version": 2
}

background.js

chrome.omnibox.onInputEntered
.addListener(function(text) {
var temp = text.split(" ", 2);
var filetype = temp[0];
text = temp[1];
var query = 'intitle:index.of +?last modified? +?parent directory? +(' + filetype + ') +"' + text + '" -htm -html -php -asp -jsp -"Passwords"';
var createProperties = {
url : "https://www.google.com/search?q="
+ encodeURIComponent(query)
};
chrome.tabs.create(createProperties);
});
chrome.omnibox.onInputStarted
.addListener(function() {
var suggestion = {
description : "Search by filetype and query term: %s using Google Open Storage Search"
}
chrome.omnibox.setDefaultSuggestion(suggestion);
});

Install (you must trust my code)

If you downloaded an extension from somewhere other than Google, Chrome will not let you install it on the fly. You have to go to the browser menu and choose Tools->Extensions to open up the Extensions tab. Then drag the extension from wherever it is on the file-system to the open Extensions page. This should start the install process. If you ever feel funny about a packed extension you can unzip them to inspect the code (if you don’t have 7zip you’ll have to change the file extension to .zip – do it on a copy).

Advertisement
Standard

One thought on “Google Chrome Extension – Google Open Storage Search, an Omnibox extension

  1. Pingback: Adobe AIR Application – Google Music Search « The Coding Adventures of Timothy Tocci

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 )

Facebook photo

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

Connecting to %s