Commit f9dd99ca authored by ramenjuniti's avatar ramenjuniti Committed by Andrew Bonventre

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/+/207402Reviewed-by: default avatarAndrew Bonventre <andybons@golang.org>
parent 0ac8739a
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 });
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment