mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-16 06:18:35 +02:00
use currentWindow:true instead of windowId to select current window
This commit is contained in:
@@ -8,7 +8,7 @@ function firstUnpinnedTab(tabs) {
|
||||
|
||||
document.addEventListener("click", function(e) {
|
||||
function callOnActiveTab(callback) {
|
||||
chrome.tabs.query({windowId: chrome.windows.WINDOW_ID_CURRENT}, function(tabs) {
|
||||
chrome.tabs.query({currentWindow: true}, function(tabs) {
|
||||
for (var tab of tabs) {
|
||||
if (tab.active) {
|
||||
callback(tab, tabs);
|
||||
|
||||
Reference in New Issue
Block a user