mirror of
				https://github.com/golang/go.git
				synced 2025-11-04 02:30:57 +00:00 
			
		
		
		
	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>
		
			
				
	
	
		
			9 lines
		
	
	
	
		
			286 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			9 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 });
 | 
						|
    });
 | 
						|
  }
 | 
						|
});
 |