diff --git a/premix/assets/js/index.js b/premix/assets/js/index.js index 5205cea4c..3f0051156 100644 --- a/premix/assets/js/index.js +++ b/premix/assets/js/index.js @@ -23,6 +23,13 @@ var premix = function() { } } + function renderCells(row, cls, cells) { + for(var text of cells) { + let cell = $(`${split32(text)}`).appendTo(row); + if(text.length > 32) cell.addClass('tm-monospace-cell'); + } + } + return { fields: ['op', 'pc', 'gas', 'gasCost', 'depth'], @@ -37,9 +44,7 @@ var premix = function() { let ncr = nimbus instanceof Object ? nimbus[x].toString().toLowerCase() : nimbus; let gcr = geth instanceof Object ? geth[x].toString().toLowerCase() : geth; let cls = ncr == gcr ? '' : 'class="uk-text-danger"'; - $(`${split32(x)}`).appendTo(row); - $(`${split32(ncr)}`).appendTo(row); - $(`${split32(gcr)}`).appendTo(row); + renderCells(row, cls, [x, ncr, gcr]); }, newSection: function(container, title, colored) { diff --git a/premix/index.html b/premix/index.html index 08ad83e1f..e78b9f7d4 100644 --- a/premix/index.html +++ b/premix/index.html @@ -22,6 +22,10 @@ overflow-y: auto; padding-left:40px; } + .tm-monospace-cell { + font-family: "Courier New", Courier, monospace; + font-weight: 500; + } .uk-nav-default > li > a.tm-text-danger { color: #f0506e; }