デバッガーで拡張機能を検索すると、chrome.tabs.queryコードが実行されないようです。nytimes.comの記事にアクセスした回数をログに記録するためにchrome.storageAPIを試していますが、最初にchrome.storageコードを追加したため、デバッガーがchrome.tabs.queryに入らないようです。働き。
var nytCount = chrome.storage.local.get["nyt"];
// if nytCount doesn't exist in chrome local storage, set to 0
if (nytCount === undefined)
{
    nytCount = 0;
}
/*
* Below is adapted from user Rob W at Stack Overflow (http://stackoverflow.com/questions/10413911/how-to-get-the-currently-opened-tabs-url-in-my-page-action-popup/10417327#10417327)
*
// Gets URL from currently active window (this should all be onload I suspect)*/
chrome.tabs.query({
    // Select active tabs
    active: true,
    // In the current window                              
    windowId: chrome.windows.WINDOW_ID_CURRENT 
}, function(array_of_Tabs) {
    // Since there can only be one active tab in one active window, the array has only one element
    var tab = array_of_Tabs[0];
    var title = tab.title;
    if (title.indexOf("NYTimes.com") !== -1)
    {
        nytCount++;
    }
    // rest of if conditions for those sites that have identifiers in tab titles
});
alert(nytCount);
何か案は?以前はnytCountを0に初期化したときに正常に機能しましたが、もちろん、コードの次の実行時に再初期化される前に、その値は1までしか上がることができませんでした。