chore: increase some browser icon sizes
|
Before Width: | Height: | Size: 806 B After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 420 B After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 635 B After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 819 B After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 819 B After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 811 B After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 811 B After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 835 B After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 835 B After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 794 B After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 632 B After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 829 B After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 621 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 794 B After Width: | Height: | Size: 3.1 KiB |
40
scripts/update-icons.js
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
const fs = require('fs');
|
||||||
|
const { Readable } = require('stream');
|
||||||
|
const { finished } = require('stream/promises');
|
||||||
|
|
||||||
|
// missing mappings: android, beaker, blackberry, curl, facebook,
|
||||||
|
// ie, instagram, ios-webview, miui, searchbot, silk, unknown
|
||||||
|
const mappings = {
|
||||||
|
'android-webview': 'android-webview',
|
||||||
|
aol: 'archive/aol-explorer',
|
||||||
|
brave: 'brave',
|
||||||
|
chrome: 'chrome',
|
||||||
|
'chromium-webview': 'chromium',
|
||||||
|
crios: 'chrome',
|
||||||
|
'edge-chromium': 'edge',
|
||||||
|
'edge-ios': 'edge',
|
||||||
|
edge: 'archive/edge_12-18',
|
||||||
|
firefox: 'firefox',
|
||||||
|
fxios: 'firefox',
|
||||||
|
'opera-mini': 'opera-mini',
|
||||||
|
opera: 'opera',
|
||||||
|
safari: 'safari',
|
||||||
|
samsung: 'samsung-internet',
|
||||||
|
silk: 'silk',
|
||||||
|
yandexbrowser: 'yandex',
|
||||||
|
};
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
for (const [k, v] of Object.entries(mappings)) {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log(k, v);
|
||||||
|
let res = await fetch(
|
||||||
|
`https://raw.githubusercontent.com/alrra/browser-logos/main/src/${v}/${v
|
||||||
|
.split('/')
|
||||||
|
.at(-1)}_48x48.png`,
|
||||||
|
);
|
||||||
|
const w = fs.createWriteStream(`./public/images/browsers/${k}.png`);
|
||||||
|
await finished(Readable.fromWeb(res.body).pipe(w));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
main();
|
||||||