[Pkg-mozext-commits] [firebug] 20/35: Fixed adding of context menu items for network requests and improved code and performance on setting filters (see comments on https://github.com/firebug/firebug/commit/b006f20b67)
David Prévot
taffit at moszumanska.debian.org
Sat May 24 14:54:28 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firebug.
commit 4074a03f2a3a07f3e32ed4546e4a2288fb6776c2
Author: Sebastian Zartner <sebastianzartner at gmail.com>
Date: Thu May 22 11:56:09 2014 +0200
Fixed adding of context menu items for network requests and improved
code and performance on setting filters
(see comments on https://github.com/firebug/firebug/commit/b006f20b67)
---
extension/content/firebug/net/netPanel.js | 47 ++++++++++++++-----------------
extension/content/firebug/net/netReps.js | 4 ---
2 files changed, 21 insertions(+), 30 deletions(-)
diff --git a/extension/content/firebug/net/netPanel.js b/extension/content/firebug/net/netPanel.js
index 8fcf152..a2106f0 100644
--- a/extension/content/firebug/net/netPanel.js
+++ b/extension/content/firebug/net/netPanel.js
@@ -387,19 +387,16 @@ NetPanel.prototype = Obj.extend(ActivablePanel,
}
);
- file.categories.forEach((category) =>
+ if (file.categories.some((category) => category in NetUtils.textFileCategories))
{
- if (category in NetUtils.textFileCategories)
- {
- items.push(
- {
- label: "CopyResponse",
- tooltiptext: "net.tip.Copy_Response",
- command: Obj.bindFixed(this.copyResponse, this, file)
- }
- );
- }
- });
+ items.push(
+ {
+ label: "CopyResponse",
+ tooltiptext: "net.tip.Copy_Response",
+ command: Obj.bindFixed(this.copyResponse, this, file)
+ }
+ );
+ }
items.push(
{
@@ -419,19 +416,16 @@ NetPanel.prototype = Obj.extend(ActivablePanel,
}
);
- file.categories.forEach((category) =>
+ if (file.categories.some((category) => category in NetUtils.textFileCategories))
{
- if (category in NetUtils.textFileCategories)
- {
- items.push(
- {
- label: "Open_Response_In_New_Tab",
- tooltiptext: "net.tip.Open_Response_In_New_Tab",
- command: Obj.bindFixed(NetUtils.openResponseInTab, this, file)
- }
- );
- }
- });
+ items.push(
+ {
+ label: "Open_Response_In_New_Tab",
+ tooltiptext: "net.tip.Open_Response_In_New_Tab",
+ command: Obj.bindFixed(NetUtils.openResponseInTab, this, file)
+ }
+ );
+ }
items.push("-");
@@ -1452,15 +1446,16 @@ NetPanel.prototype = Obj.extend(ActivablePanel,
this.filterCategories = filterCategories;
var panelNode = this.panelNode;
+ var filtering = filterCategories.join(" ") !== "all";
- if (filterCategories.join(" ") !== "all")
+ if (filtering)
panelNode.classList.add("filtering");
else
panelNode.classList.remove("filtering");
for (var category in NetUtils.fileCategories)
{
- if (filterCategories.join(" ") !== "all" && filterCategories.indexOf(category) !== -1)
+ if (filtering && filterCategories.indexOf(category) !== -1)
panelNode.classList.add("showCategory-" + category);
else
panelNode.classList.remove("showCategory-" + category);
diff --git a/extension/content/firebug/net/netReps.js b/extension/content/firebug/net/netReps.js
index cce1c28..75048c1 100644
--- a/extension/content/firebug/net/netReps.js
+++ b/extension/content/firebug/net/netReps.js
@@ -583,10 +583,6 @@ Firebug.NetMonitor.NetRequestEntry = domplate(Rep, new EventSource(),
if (!netInfoBox.selectedTab)
Firebug.NetMonitor.NetInfoBody.selectTabByName(netInfoBox, "Headers");
- var category = NetUtils.getFileCategory(row.repObject);
- if (category)
- Css.setClass(netInfoBox, "category-" + category);
-
row.setAttribute("aria-expanded", "true");
}
else
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git
More information about the Pkg-mozext-commits
mailing list