1
0
mirror of https://github.com/golang/go synced 2024-11-26 22:01:27 -07:00
go/misc/chrome/gophertool/background.js

10 lines
255 B
JavaScript
Raw Normal View History

chrome.omnibox.onInputEntered.addListener(function(t) {
var url = urlForInput(t);
if (url) {
chrome.tabs.getSelected(null, function(tab) {
if (!tab) return;
chrome.tabs.update(tab.id, { "url": url, "selected": true });
});
}
});