0

The following code,

chrome.cookies.set({
    "name": "Sample1",
    "url": "chrome-extension://iiioiioacgdgbkodamplcdcffkkkfibi",
    "value": "Dummy Data"
}, function (cookie) {
    console.log(JSON.stringify(cookie));
    console.log(chrome.extension.lastError);
    console.log(chrome.runtime.lastError);
});

is used to set cookies in chrome extensions. I want to customize the newtab page, and I want to store cookies, but I don't know the newtab url.
Can anyone can help me?

Zoltan Toth
  • 46,981
  • 12
  • 120
  • 134
  • Please [edit] the question to be on-topic: include a **complete** [mcve] that duplicates the problem. Including a *manifest.json*, some of the background *and* content scripts. Questions seeking debugging help ("**why isn't this code working?**") must include: ►the desired behavior, ►a specific problem or error *and* ►the shortest code necessary to reproduce it **in the question itself**. Questions without a clear problem statement are not useful to other readers. See: "**How to create a [mcve]**", [What topics can I ask about here?](http://stackoverflow.com/help/on-topic), and [ask]. – Makyen Nov 21 '16 at 05:50
  • What does setting cookies have to do with the new tab page? – Makyen Nov 21 '16 at 05:52
  • _We don't the newtab url either._ Jokes aside, please explain your problem better. – Xan Nov 21 '16 at 10:31
  • The URL for a new tab is `chrome://newtab`. [This answer](http://stackoverflow.com/a/37295301) has more additional info you may need. – Noam Hacker Nov 21 '16 at 14:44

0 Answers0