2012-02-25 4 views

答えて

8

deprecated in Chrome 16であった。正しい方法は、active:truelastFocusedWindow:trueとのchrome.tabs.queryを使用することです。

// Get the current active tab in the lastly focused window 
chrome.tabs.query({ 
    active: true, 
    lastFocusedWindow: true 
}, function(tabs) { 
    // and use that tab to fill in out title and url 
    var tab = tabs[0]; 
    run({ 
     url: tab.url, 
     description: tab.title 
    }); 
}); 
+0

ありがとうございました! – Donovant

+0

ありがとう、これはちょうど期待どおり私のために働く! – spetsnaz

関連する問題