Skip to content

Commit

Permalink
Updates for Firefox 1.2.11
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispederick committed Aug 18, 2016
1 parent ab12f8d commit d0a0cc4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion configuration/firefox/configuration.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
common.prefix=chrome://web-developer/content
description=Adds a menu and a toolbar with various web developer tools.
version=1.2.10
version=1.2.11
27 changes: 18 additions & 9 deletions source/firefox/javascript/cookies/cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,15 @@ WebDeveloper.Cookies.canEditLocalCookie = function()
// Deletes a cookie
WebDeveloper.Cookies.deleteCookie = function(cookie)
{
Components.classes["@mozilla.org/cookiemanager;1"].getService(Components.interfaces.nsICookieManager2).remove(cookie.host, cookie.name, cookie.path, false, false);
// Try to delete the cookie without origin attributes
try
{
Components.classes["@mozilla.org/cookiemanager;1"].getService(Components.interfaces.nsICookieManager2).remove(cookie.host, cookie.name, cookie.path, false);
}
catch(exception)
{
Components.classes["@mozilla.org/cookiemanager;1"].getService(Components.interfaces.nsICookieManager2).remove(cookie.host, cookie.name, cookie.path, false, cookie.originAttributes);
}
};

// Returns all cookies
Expand All @@ -75,14 +83,15 @@ WebDeveloper.Cookies.getAllCookies = function()
cookie = {};
cookieObject = cookieEnumeration.getNext().QueryInterface(Components.interfaces.nsICookie2);

cookie.expires = cookieObject.expires;
cookie.host = cookieObject.host;
cookie.httpOnly = cookieObject.isHttpOnly;
cookie.name = cookieObject.name;
cookie.path = cookieObject.path;
cookie.secure = cookieObject.isSecure;
cookie.session = cookieObject.isSession;
cookie.value = cookieObject.value;
cookie.expires = cookieObject.expires;
cookie.host = cookieObject.host;
cookie.httpOnly = cookieObject.isHttpOnly;
cookie.name = cookieObject.name;
cookie.originAttributes = cookieObject.originAttributes;
cookie.path = cookieObject.path;
cookie.secure = cookieObject.isSecure;
cookie.session = cookieObject.isSession;
cookie.value = cookieObject.value;

allCookies.push(cookie);
}
Expand Down

0 comments on commit d0a0cc4

Please sign in to comment.