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