1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 07:22:28 +02:00

trivial request logger work

This commit is contained in:
gorhill 2015-03-03 05:40:48 -05:00
parent d4ef9254dc
commit e899185a95
2 changed files with 9 additions and 0 deletions

View File

@ -70,6 +70,7 @@ body:not(.filterOff) #content table tr.hidden {
padding: 3px 0;
text-align: center;
white-space: pre;
width: 1em;
}
#content table tr td:nth-of-type(2) {
white-space: normal;

View File

@ -141,6 +141,13 @@ var renderLogBuffer = function(buffer) {
renderLogEntry(buffer[i]);
}
// Prevent logger from growing infinitely and eating all memory. For
// instance someone could forget that it is left opened for some
// dynamically refreshed pages.
while ( tbody.childElementCount > 25000 ) {
rowJunkyard.push(tbody.removeChild(tbody.lastElementChild));
}
var yDelta = tbody.offsetHeight - height;
if ( yDelta === 0 ) {
return;
@ -246,6 +253,7 @@ var unapplyFilter = function() {
var onFilterButton = function() {
uDom('body').toggleClass('filterOff');
uDom('#filterExpression').nodeAt(0).focus();
};
/******************************************************************************/