Skip to content

Commit

Permalink
minor code review: render domain= option as the last one
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Aug 30, 2016
1 parent 7073737 commit c3582e1
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions src/js/logger-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] + '^';
Expand Down Expand Up @@ -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(',');
}
Expand Down

0 comments on commit c3582e1

Please sign in to comment.