Is it possible to modify cookie from chrome extension content script? -


if have chrome extension content script, possible modify cookie content script? seems chrome.cookie api can't used content scripts , setting document.cookie don't change it. following code intended delete cookies, document.cookie same after completes:

    _.each(document.cookie.split(';'), function(s_cookie) {       var sname = s_cookie.replace(/=.+/, '');       var = sname + "=;expires=thu, 01 jan 1970 00:00:00 gmt";       console.log(a);       document.cookie = a;     });     console.log(document.cookie); // nothing changed. 

if case, want inject script actual page's javascript context, i.e.

chrome.tabs.executescript(tabid, {code:yourfunction.tostring()}, callback) 

Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -