From c3582e1acaadbe3ce294ddbcea4cb869eb52a14c Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 30 Aug 2016 19:54:42 -0400 Subject: [PATCH] minor code review: render `domain=` option as the last one --- src/js/logger-ui.js | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/js/logger-ui.js b/src/js/logger-ui.js index ae3d90dc7..03c2d65d4 100644 --- a/src/js/logger-ui.js +++ b/src/js/logger-ui.js @@ -195,6 +195,23 @@ var filterDecompiler = (function() { var tfields = fid !== '.' ? vfields[3].split('\t') : []; var tfield0 = tfields[0]; + // Filter options + // Importance + if ( bits & 0x02 ) { + opts.push('important'); + } + // Party + if ( bits & 0x08 ) { + opts.push('third-party'); + } else if ( bits & 0x04 ) { + opts.push('first-party'); + } + // Type + var typeVal = bits >>> 4 & 0x0F; + if ( typeVal ) { + opts.push(typeValToTypeName[typeVal]); + } + switch ( fid ) { case '.': filter += '||' + vfields[2] + '^'; @@ -258,22 +275,6 @@ var filterDecompiler = (function() { break; } - // Filter options - // Importance - if ( bits & 0x02 ) { - opts.push('important'); - } - // Party - if ( bits & 0x08 ) { - opts.push('third-party'); - } else if ( bits & 0x04 ) { - opts.push('first-party'); - } - // Type - var typeVal = bits >>> 4 & 0x0F; - if ( typeVal ) { - opts.push(typeValToTypeName[typeVal]); - } if ( opts.length !== 0 ) { filter += '$' + opts.join(','); }