Browse Source

this fixes #158

pull/2/head
gorhill 10 years ago
parent
commit
d47d8bf0bf
  1. 4
      src/_locales/en/messages.json
  2. 2
      src/js/async.js
  3. 1
      src/js/background.js
  4. 20
      src/js/httpsb.js
  5. 3
      src/settings.html

4
src/_locales/en/messages.json

@ -299,6 +299,10 @@
"message": "Opacity", "message": "Opacity",
"description": "English: Opacity" "description": "English: Opacity"
}, },
"settingsIconBadgeEnabled":{
"message":"Show the number of distinct requests on the icon",
"description":"English: Show the number of distinct requests on the icon"
},
"settingsCollapseBlocked" : { "settingsCollapseBlocked" : {
"message": "Collapse placeholder of blocked elements", "message": "Collapse placeholder of blocked elements",
"description": "English: Collapse placeholder of blocked elements" "description": "English: Collapse placeholder of blocked elements"

2
src/js/async.js

@ -153,6 +153,8 @@ return asyncJobManager;
var squareSize = 19; var squareSize = 19;
var greenSize = squareSize * Math.sqrt(pageStore.perLoadAllowedRequestCount / total); var greenSize = squareSize * Math.sqrt(pageStore.perLoadAllowedRequestCount / total);
iconId = greenSize < squareSize/2 ? Math.ceil(greenSize) : Math.floor(greenSize); iconId = greenSize < squareSize/2 ? Math.ceil(greenSize) : Math.floor(greenSize);
}
if ( this.userSettings.iconBadgeEnabled && pageStore.distinctRequestCount !== 0) {
badgeStr = this.formatCount(pageStore.distinctRequestCount); badgeStr = this.formatCount(pageStore.distinctRequestCount);
} }
} }

1
src/js/background.js

@ -61,6 +61,7 @@ return {
deleteLocalStorage: false, deleteLocalStorage: false,
displayTextSize: '13px', displayTextSize: '13px',
externalHostsFiles: '', externalHostsFiles: '',
iconBadgeEnabled: true,
maxLoggedRequests: 50, maxLoggedRequests: 50,
popupCollapseDomains: false, popupCollapseDomains: false,
popupCollapseSpecificDomains: {}, popupCollapseSpecificDomains: {},

20
src/js/httpsb.js

@ -60,26 +60,6 @@
}; };
/******************************************************************************/
µMatrix.transposeType = function(type, path) {
if ( type !== 'other' ) {
return type;
}
var pos = path.lastIndexOf('.');
if ( pos === -1 ) {
return 'other';
}
var ext = path.slice(pos) + '.';
if ( '.css.eot.ttf.otf.svg.woff.woff2.'.indexOf(ext) !== -1 ) {
return 'css';
}
if ( '.ico.png.gif.jpg.jpeg.bmp.'.indexOf(ext) !== -1 ) {
return 'image';
}
return type;
};
/******************************************************************************/ /******************************************************************************/
// Whitelist something // Whitelist something

3
src/settings.html

@ -38,6 +38,9 @@ ul > li {
<h2 data-i18n="settingsMatrixConvenienceHeader"></h2> <h2 data-i18n="settingsMatrixConvenienceHeader"></h2>
<ul> <ul>
<li>
<input id="iconBadgeEnabled" type="checkbox" data-range="bool">
<label data-i18n="settingsIconBadgeEnabled" for="iconBadgeEnabled"></label>
<li> <li>
<input id="collapseBlocked" type="checkbox" data-range="bool"> <input id="collapseBlocked" type="checkbox" data-range="bool">
<label data-i18n="settingsCollapseBlocked" for="collapseBlocked"></label> <label data-i18n="settingsCollapseBlocked" for="collapseBlocked"></label>

Loading…
Cancel
Save