mirror of
https://github.com/golang/go
synced 2024-09-06 00:19:45 +00:00
misc/chrome/gophertool: replace deprecated tabs.getSelected method
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>
This commit is contained in:
parent
0ac8739ad5
commit
f9dd99cae3
|
@ -1,7 +1,7 @@
|
|||
chrome.omnibox.onInputEntered.addListener(function(t) {
|
||||
var url = urlForInput(t);
|
||||
if (url) {
|
||||
chrome.tabs.getSelected(null, function(tab) {
|
||||
chrome.tabs.query({ "active": true, "currentWindow": true }, function(tab) {
|
||||
if (!tab) return;
|
||||
chrome.tabs.update(tab.id, { "url": url, "selected": true });
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue