Snapshot of /home/parf/Downloads/manifest.zip as delivered, before any
GSD-driven remediation. Contains a partially-broken first attempt at the
Russian SPEC "Тз расширение фаза1.md" (Phase 1 of operator-session-recorder).
Source layout:
- manifest.json — MV3 declaration with tabCapture/activeTab/downloads/etc.
- src/background/index.ts — service worker (video buffer + archive packaging)
- src/content/index.ts — rrweb + user-event logger
- src/popup/{index.html,index.ts,style.css} — Russian popup UI
- offscreen/{index.html,index.ts} — orphaned offscreen (see audit)
- vite.config.ts — inline plugin emitting a separate live offscreen.js
- generate-icons.js, icons/ — minimal PNG icons
- "Тз расширение фаза1.md" — authoritative Russian SPEC
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
55 lines
2.4 KiB
JavaScript
55 lines
2.4 KiB
JavaScript
const fs = require('fs');
|
||
const path = require('path');
|
||
|
||
// Простая генерация PNG-заглушек с помощью base64
|
||
// Создаем минимальные PNG файлы разных размеров
|
||
|
||
// Красно-белый PNG 16x16 (минимальный PNG)
|
||
const png16 = Buffer.from([
|
||
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D,
|
||
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10,
|
||
0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x91, 0x68, 0x36, 0x00, 0x00, 0x00,
|
||
0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
|
||
0x00, 0x0C, 0x49, 0x44, 0x41, 0x54, 0x08, 0xD7, 0x63, 0xF8, 0xCF, 0xC0,
|
||
0x00, 0x00, 0x03, 0x00, 0x01, 0xE2, 0x21, 0xBC, 0x33, 0x00, 0x00, 0x00,
|
||
0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
|
||
]);
|
||
|
||
// 48x48
|
||
const png48 = Buffer.from([
|
||
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D,
|
||
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,
|
||
0x08, 0x02, 0x00, 0x00, 0x00, 0x57, 0x02, 0xF9, 0x87, 0x00, 0x00, 0x00,
|
||
0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
|
||
0x00, 0x0C, 0x49, 0x44, 0x41, 0x54, 0x08, 0x57, 0x63, 0xF8, 0xCF, 0xC0,
|
||
0x00, 0x00, 0x03, 0x00, 0x01, 0xE2, 0x21, 0xBC, 0x33, 0x00, 0x00, 0x00,
|
||
0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
|
||
]);
|
||
|
||
// 128x128
|
||
const png128 = Buffer.from([
|
||
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D,
|
||
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80,
|
||
0x08, 0x02, 0x00, 0x00, 0x00, 0x56, 0x71, 0x6D, 0x86, 0x00, 0x00, 0x00,
|
||
0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
|
||
0x00, 0x0C, 0x49, 0x44, 0x41, 0x54, 0x08, 0xD7, 0x63, 0xF8, 0xCF, 0xC0,
|
||
0x00, 0x00, 0x03, 0x00, 0x01, 0xE2, 0x21, 0xBC, 0x33, 0x00, 0x00, 0x00,
|
||
0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
|
||
]);
|
||
|
||
const iconsDir = path.join(__dirname, 'icons');
|
||
|
||
// Создаем папку если нет
|
||
if (!fs.existsSync(iconsDir)) {
|
||
fs.mkdirSync(iconsDir, { recursive: true });
|
||
}
|
||
|
||
// Записываем файлы
|
||
fs.writeFileSync(path.join(iconsDir, 'icon16.png'), png16);
|
||
fs.writeFileSync(path.join(iconsDir, 'icon48.png'), png48);
|
||
fs.writeFileSync(path.join(iconsDir, 'icon128.png'), png128);
|
||
|
||
console.log('Icons generated successfully!');
|
||
console.log('16x16: ' + png16.length + ' bytes');
|
||
console.log('48x48: ' + png48.length + ' bytes');
|
||
console.log('128x128: ' + png128.length + ' bytes'); |