diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index 2725c49..2f57565 100644 --- a/platform/chromium/vapi-background.js +++ b/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; diff --git a/src/js/logger-ui.js b/src/js/logger-ui.js index 7ae9a57..2c4564d 100644 --- a/src/js/logger-ui.js +++ b/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;