Skip to content

Commit

Permalink
Only show "https://github.com/" for empty query
Browse files Browse the repository at this point in the history
  • Loading branch information
lackac committed Jun 5, 2011
1 parent 216e96d commit 7d3ed81
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ext/js/background.js
Expand Up @@ -56,9 +56,13 @@ function resetDefaultSuggestion() {
resetDefaultSuggestion();

function updateDefaultSuggestion(suggestion) {
chrome.omnibox.setDefaultSuggestion({
description: '<url><match>https://github.com/</match></url>' + (suggestion || '<match>owner/repo</match>')
});
if (suggestion) {
chrome.omnibox.setDefaultSuggestion({ description: suggestion });
} else {
chrome.omnibox.setDefaultSuggestion({
description: '<url><match>https://github.com/</match></url> <match>owner/repo</match>'
});
}
}

chrome.omnibox.onInputStarted.addListener(function() {
Expand Down

0 comments on commit 7d3ed81

Please sign in to comment.