aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgorhill <rhill@raymondhill.net>2015-02-07 15:39:46 -0500
committergorhill <rhill@raymondhill.net>2015-02-07 15:39:46 -0500
commitff2746f276c47c0be48e0d1bf309a4266a900308 (patch)
tree9be30602b3fb0645a0913b4ffc44cc8ef345323e
parent92e26cb3d787be12393c1246acb61a84c21e6dee (diff)
downloaduBlock-ff2746f276c47c0be48e0d1bf309a4266a900308.zip
uBlock-ff2746f276c47c0be48e0d1bf309a4266a900308.tar.gz
uBlock-ff2746f276c47c0be48e0d1bf309a4266a900308.tar.bz2
code review of last commit
-rw-r--r--src/js/popup.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/js/popup.js b/src/js/popup.js
index d72ff6a..c97d7f6 100644
--- a/src/js/popup.js
+++ b/src/js/popup.js
@@ -196,14 +196,18 @@ var updateDynamicFilterCell = function(scope, des, type, rule) {
}
cell.toggleClass('ownRule', ownRule);
+ if ( scope !== '.' || des === '*' ) {
+ return;
+ }
+
// IMPORTANT: It is completely assumed the first node is a TEXT_NODE, so
// ensure this in the HTML file counterpart when you make
// changes
var textNode = cell.nodeAt(0).firstChild;
- // Since this may be a cell from a reused row, we need to clear text
+ // Remember this may be a cell from a reused row, we need to clear text
// content if we can't compute request counts.
- if ( scope !== '.' || des === '*' || popupData.hostnameDict.hasOwnProperty(des) === false ) {
+ if ( popupData.hostnameDict.hasOwnProperty(des) === false ) {
textNode.nodeValue = ' ';
return;
}