Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove cookie

function onRemoved(cookie) {
  console.log(`Removed: ${cookie}`);
}

function onError(error) {
  console.log(`Error removing cookie: ${error}`);
}

function removeCookie(tabs) {
  var removing = browser.cookies.remove({
    url: tabs[0].url,
    name: "favorite-color"
  });
  removing.then(onRemoved, onError);
}

var getActive = browser.tabs.query({active: true, currentWindow: true});
getActive.then(removeCookie);
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #remove #cookie
ADD COMMENT
Topic
Name
8+8 =