Browse Source

this addresses #171

pull/2/head
gorhill 10 years ago
parent
commit
04f160efba
  1. 13
      platform/chromium/vapi-background.js
  2. 22
      src/js/logger-ui.js

13
platform/chromium/vapi-background.js

@ -681,6 +681,19 @@ vAPI.net.registerListeners = function() {
// End of: Normalizing request types
// rhill 2013-12-07:
// Tell Chromium to allow all javascript: µMatrix will control whether
// javascript execute through `Content-Policy-Directive` and webRequest.
// https://github.com/gorhill/httpswitchboard/issues/74
chrome.contentSettings.javascript.set({
primaryPattern: 'https://*/*',
setting: 'allow'
});
chrome.contentSettings.javascript.set({
primaryPattern: 'http://*/*',
setting: 'allow'
});
// Network event handlers
// >>>>>>>>
var onBeforeRequestClient = this.onBeforeRequest.callback;

22
src/js/logger-ui.js

@ -308,7 +308,8 @@ var onLogBufferRead = function(response) {
// Neuter rows for which a tab does not exist anymore
// TODO: sort to avoid using indexOf
var rowVoided = false;
var autoDeleteVoidRows = vAPI.localStorage.getItem('loggerAutoDeleteVoidRows');
var rowVoided = false, trs;
for ( var tabId in allTabIds ) {
if ( allTabIds.hasOwnProperty(tabId) === false ) {
continue;
@ -316,11 +317,16 @@ var onLogBufferRead = function(response) {
if ( response.tabIds.hasOwnProperty(tabId) ) {
continue;
}
uDom('.tab_' + tabId).removeClass('canMtx');
trs = uDom('.tab_' + tabId);
if ( autoDeleteVoidRows ) {
toJunkyard(trs);
} else {
trs.removeClass('canMtx');
rowVoided = true;
}
if ( tabId === popupManager.tabId ) {
popupManager.toggleOff();
}
rowVoided = true;
}
allTabIds = response.tabIds;
@ -504,6 +510,16 @@ var rowFilterer = (function() {
/******************************************************************************/
var toJunkyard = function(trs) {
trs.remove();
var i = trs.length;
while ( i-- ) {
trJunkyard.push(trs.nodeAt(i));
}
};
/******************************************************************************/
var clearBuffer = function() {
var tbody = document.querySelector('#content tbody');
var tr;

Loading…
Cancel
Save