Files
background.js
content.css
content.js
manifest.json
popup.css
popup.html
popup.js
Code
7 1,149
popup.js
const PRESETS = [
{
id: 'liquid-glass',
name: 'Liquid Glass',
desc: 'Frosted translucent look',
emoji: 'π«§',
preview: 'linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(120,200,255,0.3) 50%, rgba(200,150,255,0.2) 100%)',
settings: {
enabled: true,
bgColor: '#e8f4ff',
textColor: '#1a2340',
linkColor: '#2563eb',
accentColor: '#60a5fa',
bgOpacity: 88,
fontFamily: 'inherit',
fontSize: 100,
lineHeight: 16,
letterSpacing: 0,
fontWeight: 'inherit',
maxWidth: 1100,
pagePadding: 24,
blur: 0,
brightness: 105,
contrast: 95,
invertColors: false,
grayscale: false
}
},
{
id: 'galaxy',
name: 'Galaxy',
desc: 'Deep space dark theme',
emoji: 'π',
preview: 'linear-gradient(135deg, #0a0a1a 0%, #0d0520 40%, #1a0533 70%, #0a0a2e 100%)',
settings: {
enabled: true,
bgColor: '#08081a',
textColor: '#c8d8ff',
linkColor: '#a78bfa',
accentColor: '#7c3aed',
bgOpacity: 100,
fontFamily: 'system-ui, sans-serif',
fontSize: 100,
lineHeight: 16,
letterSpacing: 0,
fontWeight: 'inherit',
maxWidth: 0,
pagePadding: 0,
blur: 0,
brightness: 85,
contrast: 110,
invertColors: false,
grayscale: false
}
},
{
id: 'sunset',
name: 'Sunset',
desc: 'Warm golden hour tones',
emoji: 'π
',
preview: 'linear-gradient(135deg, #ff6b00 0%, #ff9a3c 40%, #ffcc70 100%)',
settings: {
enabled: true,
bgColor: '#fff8f0',
textColor: '#3b1f00',
linkColor: '#c2410c',
accentColor: '#ea580c',
bgOpacity: 95,
fontFamily: "'Georgia', serif",
fontSize: 102,
lineHeight: 17,
letterSpacing: 0,
fontWeight: 'inherit',
maxWidth: 1000,
pagePadding: 16,
blur: 0,
brightness: 102,
contrast: 100,
invertColors: false,
grayscale: false
}
},
{
id: 'forest',
name: 'Forest',
desc: 'Calm earthy greens',
emoji: 'πΏ',
preview: 'linear-gradient(135deg, #064e3b 0%, #065f46 50%, #14532d 100%)',
settings: {
enabled: true,
bgColor: '#f0faf4',
textColor: '#14532d',
linkColor: '#059669',
accentColor: '#10b981',
bgOpacity: 100,
fontFamily: "'Verdana', sans-serif",
fontSize: 98,
lineHeight: 16,
letterSpacing: 0,
fontWeight: 'inherit',
maxWidth: 0,
pagePadding: 0,
blur: 0,
brightness: 100,
contrast: 100,
invertColors: false,
grayscale: false
}
},
{
id: 'midnight',
name: 'Midnight',
desc: 'Pure dark minimal theme',
emoji: 'π',
preview: 'linear-gradient(135deg, #000000, #111111, #0a0a14)',
settings: {
enabled: true,
bgColor: '#101010',
textColor: '#e8e8e8',
linkColor: '#60a5fa',
accentColor: '#3b82f6',
bgOpacity: 100,
fontFamily: 'system-ui, sans-serif',
fontSize: 100,
lineHeight: 15,
letterSpacing: 0,
fontWeight: 'inherit',
maxWidth: 0,
pagePadding: 0,
blur: 0,
brightness: 90,
contrast: 105,
invertColors: false,
grayscale: false
}
},
{
id: 'cotton-candy',
name: 'Cotton Candy',
desc: 'Soft pastel dream',
emoji: 'π¬',
preview: 'linear-gradient(135deg, #fce7f3 0%, #ede9fe 50%, #dbeafe 100%)',
settings: {
enabled: true,
bgColor: '#fdf4ff',
textColor: '#4a1d6a',
linkColor: '#9333ea',
accentColor: '#a855f7',
bgOpacity: 92,
fontFamily: "'Trebuchet MS', sans-serif",
fontSize: 100,
lineHeight: 16,
letterSpacing: 0,
fontWeight: 'inherit',
maxWidth: 1050,
pagePadding: 20,
blur: 0,
brightness: 105,
contrast: 95,
invertColors: false,
grayscale: false
}
}
];
const DEFAULT_SETTINGS = {
enabled: true,
bgColor: '#ffffff',
textColor: '#000000',
linkColor: '#0066cc',
accentColor: '#7c3aed',
bgOpacity: 100,
fontFamily: 'inherit',
fontSize: 100,
lineHeight: 15,
letterSpacing: 0,
fontWeight: 'inherit',
maxWidth: 0,
pagePadding: 0,
blur: 0,
brightness: 100,
contrast: 100,
invertColors: false,
grayscale: false,
activePreset: null
};
let currentSettings = { ...DEFAULT_SETTINGS };
let savedThemes = [];
const masterToggle = document.getElementById('masterToggle');
const bgColorPicker = document.getElementById('bgColor');
const bgColorHex = document.getElementById('bgColorHex');
const textColorPicker = document.getElementById('textColor');
const textColorHex = document.getElementById('textColorHex');
const linkColorPicker = document.getElementById('linkColor');
const linkColorHex = document.getElementById('linkColorHex');
const accentColorPicker = document.getElementById('accentColor');
const accentColorHex = document.getElementById('accentColorHex');
const bgOpacitySlider = document.getElementById('bgOpacity');