This commit is contained in:
gorhill 2015-01-11 08:31:38 -05:00
parent 41fb56c53e
commit 8ff2dc362c
1 changed files with 3 additions and 2 deletions

View File

@ -211,8 +211,9 @@ var updateDynamicFilterCell = function(scope, des, type, rule) {
if ( aCount === 0 && bCount === 0 ) { if ( aCount === 0 && bCount === 0 ) {
return; return;
} }
aCount = Math.min(Math.ceil(Math.log10(aCount + 1)), 3); // https://github.com/gorhill/uBlock/issues/471
bCount = Math.min(Math.ceil(Math.log10(bCount + 1)), 3); aCount = Math.min(Math.ceil(Math.log(aCount + 1) / Math.LN10), 3);
bCount = Math.min(Math.ceil(Math.log(bCount + 1) / Math.LN10), 3);
// IMPORTANT: It is completely assumed the first node is a TEXT_NODE, so // IMPORTANT: It is completely assumed the first node is a TEXT_NODE, so
// ensure this in the HTML file counterpart when you make // ensure this in the HTML file counterpart when you make
// changes // changes