github.com/riscv/riscv-go@v0.0.0-20200123204226-124ebd6fcc8e/misc/chrome/gophertool/background.js (about) 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 });