From 3952a09f6ce51ba047f84d46a2f9fcc509998251 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 22 Oct 2014 21:26:37 -0400 Subject: [PATCH] dont display literal "1st-party" when there is no 1st-party --- src/js/popup.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/popup.js b/src/js/popup.js index 4a3959f..5f16504 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -632,6 +632,11 @@ function makeMatrixGroup0Section(hostnames) { } function makeMatrixGroup0(group) { + // Show literal "1st-party" row only if there is + // at least one 1st-party hostname + if ( Object.keys(groupsSnapshot[1]).length === 0 ) { + return; + } var groupDiv = createMatrixGroup().addClass('g0'); makeMatrixGroup0Section().appendTo(groupDiv); groupDiv.appendTo(matrixList);