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",
"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" : {
"message": "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 greenSize = squareSize * Math.sqrt(pageStore.perLoadAllowedRequestCount / total);
iconId = greenSize < squareSize/2 ? Math.ceil(greenSize) : Math.floor(greenSize);
}
if ( this.userSettings.iconBadgeEnabled && pageStore.distinctRequestCount !== 0) {
badgeStr = this.formatCount(pageStore.distinctRequestCount);
}
}

1
src/js/background.js

@ -61,6 +61,7 @@ return {
deleteLocalStorage: false,
displayTextSize: '13px',
externalHostsFiles: '',
iconBadgeEnabled: true,
maxLoggedRequests: 50,
popupCollapseDomains: false,
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

3
src/settings.html

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

Loading…
Cancel
Save