mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-18 08:52:26 +02:00
actually, voided rows are important for diagnosis
This commit is contained in:
parent
2edeb9c3e8
commit
c3284a2b93
@ -157,7 +157,10 @@ body.compactView #content td {
|
|||||||
font: 1em FontAwesome;
|
font: 1em FontAwesome;
|
||||||
}
|
}
|
||||||
#content table tr.tab:not(.canMtx) {
|
#content table tr.tab:not(.canMtx) {
|
||||||
opacity: 0.2;
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
#content table tr.tab:not(.canMtx):hover {
|
||||||
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
#content table tr.tab:not(.canMtx) > td:nth-of-type(2):before {
|
#content table tr.tab:not(.canMtx) > td:nth-of-type(2):before {
|
||||||
content: '\f00d';
|
content: '\f00d';
|
||||||
|
@ -343,7 +343,8 @@ var onLogBufferRead = function(response) {
|
|||||||
|
|
||||||
// Neuter rows for which a tab does not exist anymore
|
// Neuter rows for which a tab does not exist anymore
|
||||||
// TODO: sort to avoid using indexOf
|
// TODO: sort to avoid using indexOf
|
||||||
var rowVoided = false;
|
var autoDeleteVoidRows = vAPI.localStorage.getItem('loggerAutoDeleteVoidRows');
|
||||||
|
var rowVoided = false, trs;
|
||||||
for ( var tabId in allTabIds ) {
|
for ( var tabId in allTabIds ) {
|
||||||
if ( allTabIds.hasOwnProperty(tabId) === false ) {
|
if ( allTabIds.hasOwnProperty(tabId) === false ) {
|
||||||
continue;
|
continue;
|
||||||
@ -351,16 +352,28 @@ var onLogBufferRead = function(response) {
|
|||||||
if ( response.tabIds.hasOwnProperty(tabId) ) {
|
if ( response.tabIds.hasOwnProperty(tabId) ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
toJunkyard(uDom('.tab_' + tabId));
|
trs = uDom('.tab_' + tabId);
|
||||||
|
if ( autoDeleteVoidRows ) {
|
||||||
|
toJunkyard(trs);
|
||||||
|
} else {
|
||||||
|
trs.removeClass('canMtx');
|
||||||
|
rowVoided = true;
|
||||||
|
}
|
||||||
if ( tabId === popupManager.tabId ) {
|
if ( tabId === popupManager.tabId ) {
|
||||||
popupManager.toggleOff();
|
popupManager.toggleOff();
|
||||||
}
|
}
|
||||||
rowVoided = true;
|
|
||||||
}
|
}
|
||||||
allTabIds = response.tabIds;
|
allTabIds = response.tabIds;
|
||||||
|
|
||||||
renderLogEntries(response);
|
renderLogEntries(response);
|
||||||
|
|
||||||
|
if ( rowVoided ) {
|
||||||
|
uDom('#clean').toggleClass(
|
||||||
|
'disabled',
|
||||||
|
tbody.querySelector('tr.tab:not(.canMtx)') === null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Synchronize toolbar with content of log
|
// Synchronize toolbar with content of log
|
||||||
uDom('#clear').toggleClass(
|
uDom('#clear').toggleClass(
|
||||||
'disabled',
|
'disabled',
|
||||||
@ -550,6 +563,18 @@ var clearBuffer = function() {
|
|||||||
trJunkyard.push(tbody.removeChild(tr));
|
trJunkyard.push(tbody.removeChild(tr));
|
||||||
}
|
}
|
||||||
uDom('#clear').addClass('disabled');
|
uDom('#clear').addClass('disabled');
|
||||||
|
uDom('#clean').addClass('disabled');
|
||||||
|
};
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
var cleanBuffer = function() {
|
||||||
|
var rows = uDom('#content tr.tab:not(.canMtx)').remove();
|
||||||
|
var i = rows.length;
|
||||||
|
while ( i-- ) {
|
||||||
|
trJunkyard.push(rows.nodeAt(i));
|
||||||
|
}
|
||||||
|
uDom('#clean').addClass('disabled');
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
@ -677,6 +702,7 @@ uDom.onLoad(function() {
|
|||||||
readLogBuffer();
|
readLogBuffer();
|
||||||
|
|
||||||
uDom('#compactViewToggler').on('click', toggleCompactView);
|
uDom('#compactViewToggler').on('click', toggleCompactView);
|
||||||
|
uDom('#clean').on('click', cleanBuffer);
|
||||||
uDom('#clear').on('click', clearBuffer);
|
uDom('#clear').on('click', clearBuffer);
|
||||||
uDom('#maxEntries').on('change', onMaxEntriesChanged);
|
uDom('#maxEntries').on('change', onMaxEntriesChanged);
|
||||||
uDom('#content table').on('click', 'tr.canMtx > td:nth-of-type(2)', popupManager.toggleOn);
|
uDom('#content table').on('click', 'tr.canMtx > td:nth-of-type(2)', popupManager.toggleOn);
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<span id="compactViewToggler" class="button fa"></span>
|
<span id="compactViewToggler" class="button fa"></span>
|
||||||
|
<span id="clean" class="button fa disabled"></span>
|
||||||
<span id="clear" class="button fa disabled"></span>
|
<span id="clear" class="button fa disabled"></span>
|
||||||
<span id="filterButton" class="button fa"></span><input id="filterInput" type="text" placeholder="logFilterPrompt">
|
<span id="filterButton" class="button fa"></span><input id="filterInput" type="text" placeholder="logFilterPrompt">
|
||||||
<input id="maxEntries" type="text" size="5" title="logMaxEntriesTip">
|
<input id="maxEntries" type="text" size="5" title="logMaxEntriesTip">
|
||||||
|
Loading…
Reference in New Issue
Block a user