mirror of
https://github.com/golang/go
synced 2024-11-14 07:50:21 -07:00
f9dd99cae3
tabs.getSelected has been deprecated since Chrome 33. Instead, use tabs.query. Fixes #35663 Change-Id: I4f7f17f948987aff8409ac8210f04eb1f7ebf908 Reviewed-on: https://go-review.googlesource.com/c/go/+/207402 Reviewed-by: Andrew Bonventre <andybons@golang.org>
10 lines
286 B
JavaScript
10 lines
286 B
JavaScript
chrome.omnibox.onInputEntered.addListener(function(t) {
|
|
var url = urlForInput(t);
|
|
if (url) {
|
|
chrome.tabs.query({ "active": true, "currentWindow": true }, function(tab) {
|
|
if (!tab) return;
|
|
chrome.tabs.update(tab.id, { "url": url, "selected": true });
|
|
});
|
|
}
|
|
});
|