Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added new column to cookies panel #43

Closed
wants to merge 3 commits into from

3 participants

@bharaththiruveedula

No description provided.

@janodvarko
Owner

Couple of comments:

1) Please do not create lines longer than 100 characters
Read: https://getfirebug.com/wiki/index.php/Firebug_Coding_Style
(I already noted that here: bharaththiruveedula@fa4090a)

2) There is one new column but 'colspan' attribute is not updated in the code. Please search carefully the code and make sure it's updated everywhere. See e.g. https://github.com/firebug/firebug/blob/master/extension/content/firebug/cookies/cookieReps.js#L126

The reason why I saw different sizes solved after I updated again.
(the getRawSize method properly uses cookie.cookie.rawValue.length now)

Honza

@staabm

@janodvarko
Github support Contribution Guidelines, which are shown to the user when opening a PR/Issues.
see https://github.com/blog/1184-contributing-guidelines

Maybe you should write down (copy existing guidelines) into a CONTRIBUTING file, so people can help the project in a more effective way..

@janodvarko
Owner

@staabm: thanks for the tip!

Done here: 1f033d9

Honza

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 2, 2012
  1. @bharaththiruveedula
Commits on Nov 22, 2012
  1. @bharaththiruveedula
Commits on Dec 12, 2012
  1. @bharaththiruveedula
This page is out of date. Refresh to see the latest.
View
3  extension/content/firebug/cookies/cookiePanel.js
@@ -488,7 +488,8 @@ CookiePanel.prototype = Obj.extend(Firebug.ActivablePanel,
var row = Dom.getAncestorByClass(target, "cookieRow");
if (row && row.repObject)
{
- if (Dom.getAncestorByClass(target, "cookieSizeCol"))
+ if (Dom.getAncestorByClass(target, "cookieSizeCol") ||
+ Dom.getAncestorByClass(target, "cookieRawSizeCol"))
{
var infoTipCookieId = "cookiesize-"+row.repObject.name;
if (infoTipCookieId == this.infoTipCookieId && row.repObject == this.infoTipCookie)
View
15 extension/content/firebug/cookies/cookieReps.js
@@ -100,6 +100,9 @@ CookieReps.CookieRow = domplate(CookieReps.Rep,
SPAN({"class": "cookieDomainLabel cookieLabel", onclick: "$onClickDomain"},
"$cookie|getDomain")
),
+ TD({"class": "cookieRawSizeCol cookieCol"},
+ DIV({"class": "cookieRawSizeLabel cookieLabel"}, "$cookie|getRawSize")
+ ),
TD({"class": "cookieSizeCol cookieCol"},
DIV({"class": "cookieSizeLabel cookieLabel"}, "$cookie|getSize")
),
@@ -232,6 +235,12 @@ CookieReps.CookieRow = domplate(CookieReps.Rep,
{
return !!cookie.cookie.rejected;
},
+
+ getRawSize: function(cookie)
+ {
+ var size = cookie.cookie.name.length + cookie.cookie.rawValue.length;
+ return Str.formatSize(size);
+ },
getSize: function(cookie)
{
@@ -1015,6 +1024,12 @@ CookieReps.CookieTable = domplate(CookieReps.Rep,
title: Locale.$STR("cookies.header.domain.tooltip")},
Locale.$STR("cookies.header.domain"))
),
+ TD({id: "colRawSize", role: "columnheader",
+ "class": "cookieHeaderCell a11yFocus"},
+ DIV({"class": "cookieHeaderCellBox",
+ title: Locale.$STR("cookies.header.size.tooltip")},
+ Locale.$STR("cookies.header.rawSize"))
+ ),
TD({id: "colSize", role: "columnheader",
"class": "cookieHeaderCell a11yFocus"},
DIV({"class": "cookieHeaderCellBox",
View
1  extension/locale/en-US/cookies.properties
@@ -155,6 +155,7 @@ cookies.header.value=Value
cookies.header.rawValue=Raw Value
cookies.header.domain=Domain
cookies.header.size=Size
+cookies.header.rawSize = Raw Size
cookies.header.path=Path
cookies.header.expires=Expires
cookies.header.security=Security
Something went wrong with that request. Please try again.