//cохраняю куки chrome.cookies.set({ url: "http://ru.stackoverflow.com/", name: "test", value: JSON.stringify({link: "OK" })}); //извлекаю куки function getCookies(domain, name, callback) { chrome.cookies.get({"url": domain, "name": name}, function(cookie) { if(callback) { callback(cookie.value); } }); } var check_cookies = getCookies("http://ru.stackoverflow.com/", "test", function(id) { console.log("id: " + id); }); //если кук нет, выполнить действие if (!check_cookies){ выполнить действие } You need to check if there are any saved cookies for the site (the contents of the cookies are not important, their presence is important).
api, which means you will have to create it yourself. I do not know exactly your situation, but you need to get cookies and already check whether they are or whether they have something that you need. - user220409