this fixes #47

pull/2/head
gorhill 10 years ago
parent 667becf500
commit 9cc0e9bba0

@ -62,6 +62,9 @@
µm.userSettings = store; µm.userSettings = store;
// https://github.com/gorhill/uMatrix/issues/47
µm.resizeLogBuffers(store.maxLoggedRequests);
// https://github.com/gorhill/httpswitchboard/issues/344 // https://github.com/gorhill/httpswitchboard/issues/344
µm.userAgentSpoofer.shuffle(); µm.userAgentSpoofer.shuffle();

@ -385,6 +385,17 @@
/******************************************************************************/ /******************************************************************************/
µMatrix.resizeLogBuffers = function(size) {
var pageStores = this.pageStats;
for ( var pageURL in pageStores ) {
if ( pageStores.hasOwnProperty(pageURL) ) {
pageStores[pageURL].requests.resizeLogBuffer(size);
}
}
};
/******************************************************************************/
µMatrix.forceReload = function(pageURL) { µMatrix.forceReload = function(pageURL) {
var tabId = this.tabIdFromPageUrl(pageURL); var tabId = this.tabIdFromPageUrl(pageURL);
if ( tabId ) { if ( tabId ) {

@ -52,14 +52,8 @@
// Post-change // Post-change
switch ( name ) { switch ( name ) {
// Need to visit each pageStats object to resize ring buffer
case 'maxLoggedRequests': case 'maxLoggedRequests':
var pageStats = this.pageStats; this.resizeLogBuffers(value);
for ( var pageUrl in pageStats ) {
if ( pageStats.hasOwnProperty(pageUrl) ) {
pageStats[pageUrl].requests.resizeLogBuffer(value);
}
}
break; break;
// https://github.com/gorhill/httpswitchboard/issues/344 // https://github.com/gorhill/httpswitchboard/issues/344

Loading…
Cancel
Save