pull/2/head
gorhill 10 years ago
parent 44f1a61c42
commit d47d8bf0bf

@ -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"

@ -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);
}
}

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

@ -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

@ -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