Browse Source

improved cookie emphasis in logger

pull/2/head
gorhill 10 years ago
parent
commit
7dcfdf9e08
  1. 4
      src/css/logger-ui.css
  2. 2
      src/js/cookies.js
  3. 12
      src/js/logger-ui.js

4
src/css/logger-ui.css

@ -74,7 +74,7 @@ input:focus {
width: 100%;
}
#content table > colgroup > col:nth-of-type(1) {
width: 6em;
width: 5.5em;
}
#content table > colgroup > col:nth-of-type(2) {
width: 2.5em;
@ -86,7 +86,7 @@ input:focus {
width: 5em;
}
#content table > colgroup > col:nth-of-type(5) {
width: calc(100% - 19em);
width: calc(100% - 15.5em);
}
#content table tr {
background-color: #fafafa;

2
src/js/cookies.js

@ -213,7 +213,7 @@ var cookieLogEntryBuilder = [
'',
'{',
'',
'_cookie:',
'-cookie:',
'',
'}'
];

12
src/js/logger-ui.js

@ -36,7 +36,7 @@ var trJunkyard = [];
var tdJunkyard = [];
var firstVarDataCol = 2; // currently, column 2 (0-based index)
var lastVarDataIndex = 3; // currently, d0-d3
var maxEntries = 1000;
var maxEntries = 0;
var noTabId = '';
var allTabIds = {};
@ -93,7 +93,9 @@ var emphasizeCookie = function(s) {
cnode.childNodes[0].textContent = text.slice(0, beg);
cnode.childNodes[1].textContent = text.slice(beg, end);
cnode.childNodes[2].textContent = text.slice(end);
pnode.replaceChild(cnode, pnode.childNodes[2]);
pnode.replaceChild(cnode.childNodes[0], pnode.childNodes[2]);
pnode.appendChild(cnode.childNodes[0]);
pnode.appendChild(cnode.childNodes[0]);
return pnode;
};
@ -230,7 +232,11 @@ var renderLogEntry = function(entry) {
tr.cells[fvdc].textContent = '';
}
tr.cells[fvdc+1].textContent = (prettyRequestTypes[entry.d2] || entry.d2);
tr.cells[fvdc+2].appendChild(emphasizeHostname(entry.d1));
if ( entry.d2 === 'cookie' ) {
tr.cells[fvdc+2].appendChild(emphasizeCookie(entry.d1));
} else {
tr.cells[fvdc+2].appendChild(emphasizeHostname(entry.d1));
}
break;
default:

Loading…
Cancel
Save