feat: Add initial Firefox container tab extension with popup UI, background script, manifest, and a comprehensive set of icons.
This commit is contained in:
49
generate-icons.js
Normal file
49
generate-icons.js
Normal file
@@ -0,0 +1,49 @@
|
||||
// Generate colored SVG icon files for all color-icon combinations
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const colors = {
|
||||
'blue': '#37adff',
|
||||
'turquoise': '#00c79a',
|
||||
'green': '#51cd00',
|
||||
'yellow': '#ffcb00',
|
||||
'orange': '#ff9f00',
|
||||
'red': '#ff613d',
|
||||
'pink': '#ff4bda',
|
||||
'purple': '#af51f5',
|
||||
'toolbar': '#7c7c7d'
|
||||
};
|
||||
|
||||
const icons = {
|
||||
'fence': 'M28 4l-2 2v4h-4V6l-2-2-2 2v4h-4V6l-2-2-2 2v4H6V6L4 4 2 6v22h4v-4h4v4h4v-4h4v4h4v-4h4v4h4V6l-2-2zM6 22V12h4v10H6zm8 0V12h4v10h-4zm8 0V12h4v10h-4z',
|
||||
'dollar': 'M16.2,0c-8.9,0-16,7.3-16,16c0,8.9,7.1,16,15.8,16s15.8-7.1,15.8-16C32,7.3,24.9,0,16.2,0z M17.1,25.1v1.6c0,0.4-0.4,0.5-0.7,0.5c-0.4,0-0.7-0.2-0.7-0.5v-1.6c-3.2-0.2-5-1.8-5.5-4.3c0-0.2,0-0.2,0-0.4c0-0.5,0.4-0.9,0.9-0.9c0.2,0,0.2,0,0.4,0c0.5,0,0.9,0.2,1.1,0.7c0.4,1.8,1.2,2.7,3.4,2.8v-6.8c-3.6-0.4-5.3-1.8-5.3-4.6c0-3,2.5-4.6,5.2-4.8V5.7c0-0.4,0.4-0.5,0.7-0.5c0.4,0,0.7,0.2,0.7,0.5v1.1c2.7,0.4,4.4,1.8,5,3.9c0,0.2,0,0.2,0,0.4c0,0.5-0.4,0.7-0.7,0.9c-0.2,0-0.2,0-0.4,0c-0.4,0-0.7-0.2-0.9-0.7c-0.4-1.4-1.2-2.3-3-2.5v6c3.2,0.7,5.5,1.8,5.5,5.2C22.8,23.5,20.1,25.1,17.1,25.1z M12.4,11.6c0,1.6,0.7,2.5,3.2,3V8.7C13.7,8.9,12.4,10,12.4,11.6z M17.1,16.9v6.4c2.3-0.2,3.6-1.2,3.6-3.2C20.6,17.8,19.2,17.2,17.1,16.9z',
|
||||
'briefcase': 'M23.1,5.3c0-1.4-1.2-2.7-2.8-2.7h-8.7c-1.4,0-2.7,1.2-2.7,2.7v4.4H7.1v19.6h17.8V9.8h-1.8V5.3z M20.8,9.8H11V5.3c0-0.4,0.2-0.5,0.5-0.5h8.7c0.4,0,0.5,0.2,0.5,0.5V9.8z M1.8,9.8h2.7v19.6H1.8c-0.9,0-1.8-0.9-1.8-1.8v-16C0,10.5,0.9,9.8,1.8,9.8z M32,11.6v16c0,0.9-0.7,1.8-1.8,1.8h-2.7V9.8h2.7C31.3,9.8,32,10.5,32,11.6z',
|
||||
'fingerprint': 'M7.18,12c-.07,0-.14,0-.21-.01-.64-.09-1.07-.6-.96-1.13C7.42,4.26,12.26,2.57,15.02,2.16c4.62-.7,9.32,1.06,10.81,3.14.33.46.15,1.06-.41,1.33-.56.28-1.28.12-1.61-.35-.92-1.28-4.64-2.78-8.36-2.22-2.64.4-6.02,1.96-7.11,7.12-.1.47-.6.81-1.16.81zm9.45,14c-.49,0-.98-.03-1.49-.11-4.51-.64-8.44-4.08-9.13-8.01-.1-.59.31-1.14.94-1.24.63-.11,1.21.29,1.32.88.53,3,3.7,5.74,7.21,6.23,1.91.27,5.47.06,7.83-4.38,1.14-2.15-.29-7.5-3.35-10.03-1.71-1.42-3.5-1.58-5.29-.45-1.4.88-2.86,3.39-2.8,5.73.05,1.85.97,3.3,2.75,4.31.6.34,2.32.56,3.32-.1.78-.52,1.02-1.55.69-3.07-.25-1.19-1.41-3.31-1.97-3.39,0,0-.2.06-.54.54-.27.38-.54,1.82-.18,2.45.07.12.12.19.37.19.63,0,1.15.48,1.15,1.08s-.51,1.08-1.15,1.08c-1.06,0-1.91-.47-2.39-1.33-.82-1.44-.37-3.72.29-4.66,1.03-1.46,2.14-1.6,2.89-1.46,2.59.48,3.77,5.04,3.78,5.08.64,3.03-.53,4.53-1.64,5.26-1.85,1.23-4.57.9-5.83.2-3.11-1.76-3.82-4.29-3.87-6.1-.08-3.32,1.91-6.38,3.82-7.58,2.65-1.66,5.6-1.43,8.08.63,3.65,3.03,5.62,9.4,3.9,12.61-1.94,3.65-5.08,5.66-8.73,5.66zm-.55,4c-1.15,0-2.18-.14-3.04-.34-2.83-.64-5.45-2.21-6.85-4.09-.35-.47-.21-1.09.3-1.4.51-.31,1.21-.18,1.56.28,1.83,2.47,7.88,5.53,14.19,1.77.52-.31,1.22-.19,1.56.28.35.47.21,1.09-.3,1.4-2.7,1.62-5.27,2.11-7.42,2.11z',
|
||||
'cart': 'M26.9,21.4H9.4c-0.7,0-1.3,0.5-1.3,1.3s0.5,1.3,1.3,1.3h17.5c0.7,0,1.3-0.5,1.3-1.3C28.5,21.9,27.8,21.4,26.9,21.4z M13.3,30.1c1.3,0,2.7-1.2,2.7-2.7c0-1.3-1.2-2.7-2.7-2.7s-2.7,1.2-2.7,2.7C10.6,29,12,30.1,13.3,30.1z M23.9,30.1c1.3,0,2.7-1.2,2.7-2.7c0-1.3-1.2-2.7-2.7-2.7c-1.5,0-2.7,1.2-2.7,2.7C21.4,29,22.6,30.1,23.9,30.1z M31.5,7.4L31.5,7.4H7.6V7.2L5.7,2.5C5.4,2.2,5.1,1.9,4.6,1.9H0.7C0,1.9,0,2.5,0,2.9C0,3.5-0.2,4,0.7,4.2h2.7l0.7,1.5l4,13.3c0,0.2,0.2,0.5,0.8,0.5h18.5c0.3,0,0.7-0.2,0.7-0.5L32,8.3C32,8.1,31.8,7.4,31.5,7.4z',
|
||||
'vacation': 'M3.6,27l-2.5-1.8L0.8,25c-0.7-0.4-0.7-1.2-0.4-2c0.4-0.5,1.1-0.7,1.6-0.5l3.6,1.2c0-0.4,0.2-0.9,0.4-1.4c0.2-0.7,0.5-1.6,1.1-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.2-1.6c0-2,0.2-4.9,1.6-7.9c0,0,0.9-1.6,0.7-1.8C18,7.2,14.4,0,10.4,0C5,0,0.7,12.6,0.7,18z M18.3,22.8c0,3.1,2.2,5.6,4.9,6.3V32h3.2v-2.9c2.7-0.7,4.9-3.2,4.9-6.3c0-3.6-2.9-12.9-6.5-12.9S18.3,19.2,18.3,22.8z',
|
||||
'chill': 'M9.1,18.5l-5.7,5.9C3.2,23.8,3,23.3,3,22.6c0-2.5,2-4.4,4.4-4.4C7.8,18.1,8.5,18.3,9.1,18.5 M26.5,18.5l-5.7,5.9c-0.2-0.5-0.4-1.1-0.4-1.8c0-2.5,2-4.4,4.4-4.4C25.4,18.1,26,18.3,26.5,18.5 M24.7,2L24.7,2c-0.7,0-1.4,0.7-1.4,1.4s0.7,1.4,1.4,1.4c2.5,0,4.4,2,4.4,4.4v7.6c-1.6-1.2-3.6-1.8-5.5-1.4c-2.1,0.4-3.9,1.6-5,3.4c-1.6-1.2-3.9-1.2-5.5,0c-1.1-1.8-2.8-3-5-3.4c-2-0.4-3.9,0.2-5.5,1.4V9.2c0-2.5,2-4.4,4.4-4.4c0.5,0,0.9-0.4,1.2-0.7c0.2-0.4,0.2-0.9,0-1.4C8.2,2.3,7.6,2,7.1,2C3.2,2,0,5.2,0,9.2v13.5C0,26.7,3.2,30,7.1,30l0,0c3.9,0,7.1-3.2,7.1-7.3c0-0.2,0-0.4,0-0.5c0.2-0.9,0.9-1.4,1.8-1.4s1.6,0.5,1.8,1.4v0.2c0,0.2,0,0.2,0,0.4c0,2,0.7,3.7,2.1,5c1.4,1.4,3,2.1,5,2.1l0,0c2,0,3.6-0.7,5-2.1c1.4-1.2,2.1-3.2,2.1-5V9.2C32,5.2,28.8,2,24.7,2',
|
||||
'circle': 'M16 0a16 16 0 1 0 16 16A16 16 0 0 0 16 0z'
|
||||
};
|
||||
|
||||
const iconsDir = path.join(__dirname, 'icons');
|
||||
|
||||
// Generate SVG for each color-icon combination
|
||||
for (const [colorName, colorHex] of Object.entries(colors)) {
|
||||
for (const [iconName, iconPath] of Object.entries(icons)) {
|
||||
const svgContent = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 32 32">
|
||||
<path fill="${colorHex}" d="${iconPath}"/>
|
||||
</svg>`;
|
||||
|
||||
const filename = `${colorName}-${iconName}.svg`;
|
||||
const filepath = path.join(iconsDir, filename);
|
||||
fs.writeFileSync(filepath, svgContent);
|
||||
console.log(`Created: ${filename}`);
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Done! Generated ' + Object.keys(colors).length * Object.keys(icons).length + ' icons');
|
||||
Reference in New Issue
Block a user