1 chrome.omnibox.onInputEntered.addListener(function(t) { 2 var url = urlForInput(t); 3 if (url) { 4 chrome.tabs.getSelected(null, function(tab) { 5 if (!tab) return; 6 chrome.tabs.update(tab.id, { "url": url, "selected": true }); 7 }); 8 } 9 }); 10