Browse Source

this fixes #47

pull/2/head
gorhill 10 years ago
parent
commit
9cc0e9bba0
  1. 3
      src/js/storage.js
  2. 11
      src/js/tab.js
  3. 8
      src/js/usersettings.js

3
src/js/storage.js

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

11
src/js/tab.js

@ -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) {
var tabId = this.tabIdFromPageUrl(pageURL);
if ( tabId ) {

8
src/js/usersettings.js

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

Loading…
Cancel
Save