mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-06-14 00:05:08 +12:00
this addresses #171
This commit is contained in:
parent
8fcecdbde8
commit
04f160efba
|
@ -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;
|
||||
|
|
|
@ -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…
Reference in a new issue