mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-19 20:51:14 +02:00
Add 64px toolbar icon for 4K displays
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/2477
This commit is contained in:
parent
08815e9798
commit
10f9559a52
4 changed files with 19 additions and 8 deletions
|
@ -6,7 +6,8 @@
|
|||
"browser_action": {
|
||||
"default_icon": {
|
||||
"16": "img/icon_16.png",
|
||||
"32": "img/icon_32.png"
|
||||
"32": "img/icon_32.png",
|
||||
"64": "img/icon_64.png"
|
||||
},
|
||||
"default_title": "uBlock Origin",
|
||||
"default_popup": "popup-fenix.html"
|
||||
|
|
|
@ -674,8 +674,16 @@ if ( webext.browserAction instanceof Object ) {
|
|||
browser.runtime.getManifest().browser_action.default_title +
|
||||
' ({badge})';
|
||||
const icons = [
|
||||
{ path: { '16': 'img/icon_16-off.png', '32': 'img/icon_32-off.png' } },
|
||||
{ path: { '16': 'img/icon_16.png', '32': 'img/icon_32.png' } },
|
||||
{ path: {
|
||||
'16': 'img/icon_16-off.png',
|
||||
'32': 'img/icon_32-off.png',
|
||||
'64': 'img/icon_64-off.png',
|
||||
} },
|
||||
{ path: {
|
||||
'16': 'img/icon_16.png',
|
||||
'32': 'img/icon_32.png',
|
||||
'64': 'img/icon_64.png',
|
||||
} },
|
||||
];
|
||||
|
||||
(( ) => {
|
||||
|
@ -702,9 +710,8 @@ if ( webext.browserAction instanceof Object ) {
|
|||
|
||||
const imgs = [];
|
||||
for ( let i = 0; i < icons.length; i++ ) {
|
||||
const path = icons[i].path;
|
||||
for ( const key in path ) {
|
||||
if ( path.hasOwnProperty(key) === false ) { continue; }
|
||||
for ( const key of Object.keys(icons[i].path) ) {
|
||||
if ( parseInt(key, 10) >= 64 ) { continue; }
|
||||
imgs.push({ i: i, p: key, cached: false });
|
||||
}
|
||||
}
|
||||
|
@ -818,6 +825,7 @@ if ( webext.browserAction instanceof Object ) {
|
|||
path: {
|
||||
'16': `img/icon_16${flavor}.png`,
|
||||
'32': `img/icon_32${flavor}.png`,
|
||||
'64': `img/icon_64${flavor}.png`,
|
||||
}
|
||||
});
|
||||
browserAction.setBadgeText({ text });
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
"browser_style": false,
|
||||
"default_icon": {
|
||||
"16": "img/icon_16.png",
|
||||
"32": "img/icon_32.png"
|
||||
"32": "img/icon_32.png",
|
||||
"64": "img/icon_64.png"
|
||||
},
|
||||
"default_title": "uBlock Origin",
|
||||
"default_popup": "popup-fenix.html"
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
"browser_action": {
|
||||
"default_icon": {
|
||||
"16": "img/icon_16.png",
|
||||
"32": "img/icon_32.png"
|
||||
"32": "img/icon_32.png",
|
||||
"64": "img/icon_64.png"
|
||||
},
|
||||
"default_popup": "popup-fenix.html",
|
||||
"default_title": "uBlock Origin"
|
||||
|
|
Loading…
Reference in a new issue