mirror of
https://github.com/umami-software/umami.git
synced 2026-02-22 05:25:36 +01:00
chore: increase some browser icon sizes
This commit is contained in:
parent
c3fee86146
commit
4c0b075f7b
18 changed files with 40 additions and 0 deletions
40
scripts/update-icons.js
Normal file
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();
|
||||
Loading…
Add table
Add a link
Reference in a new issue