Files
Outcut/content/settings-defaults.js
Joel Brock 3de2db7d89 rename: Outlook Relook → Outcut, add keyboard presets, remove design UI from popup
- Rename extension to "Outcut" throughout all source files and console logs
- Add KEY_PRESETS object (gmail/outlook) and matchesAction() helper to keyboard.js
- Rewrite handleKeydown to use preset-based dispatch instead of hardcoded switch
- Update updateSettings to re-init when keyboardPreset changes
- Add keyboardPreset: 'gmail' default to settings-defaults.js
- Replace popup Design Tweaks UI with preset dropdown + dynamic help text
- Keep all design tweak content script logic intact (activatable via storage)
- Update manifest: version 1.0.0, remove activeTab, add homepage_url
2026-04-27 14:11:45 -07:00

117 lines
3.2 KiB
JavaScript

// Outlook Relook — Settings Defaults
// Loaded first by manifest. Exposes window.OutlookRelook.DEFAULTS and helpers.
window.OutlookRelook = window.OutlookRelook || {};
window.OutlookRelook.DEFAULTS = {
// Keyboard Navigation (primary feature, always visible)
keyboardMultiSelect: true,
keyboardPreset: 'gmail',
// Design Tweaks (experimental, hidden by default)
enableDesignTweaks: false,
// Theme & Appearance
theme: 'swiss',
colorScheme: 'system', // 'light' | 'dark' | 'system'
accentColor: '', // empty = theme default
// Density & Spacing
densityPreset: 'compact', // 'comfortable' | 'compact' | 'ultra-compact'
compactTopBar: true,
compactCommandBar: true,
compactMessageList: true,
compactReadingPane: true,
compactFolderPane: true,
narrowDateColumn: true,
compressComposeToolbar: true,
readingPaneMaxWidth: true,
unifiedHeader: false,
// Hide Elements
hideCopilot: true,
hideSuggestedReplies: true,
hidePromoBanners: true,
hideFocusedOtherTabs: true,
hideSidebarAppIcons: false,
hideGroupsSection: false,
hideMyDayButtons: false,
hideSenderAvatars: false,
hideFeatureDiscovery: true,
hideVivaInsights: true,
hideUnreadOtherBanner: true,
hideActivityFeed: true,
// Readability
unreadDistinction: true,
previewOwnLine: false,
normalizeFontWeight: true,
darkModeEmailFix: true,
messageListFontSize: 'medium', // 'small' | 'medium' | 'large'
// Behavior
autoCollapseRibbon: true,
rememberSidebarState: true,
suppressContactHover: true,
autoAdvanceAfterDelete: true,
autoDismissToasts: '5', // 'off' | '3' | '5' | '10' (seconds)
toastPosition: 'top-right', // 'bottom-left' | 'top-right'
stickyReplyBar: true,
autoResizeCompose: true,
throttleNotifications: false,
// Quick Actions
markAllReadButton: true,
quickFolderJump: true,
};
// Density presets define which individual toggles each preset sets
window.OutlookRelook.DENSITY_PRESETS = {
comfortable: {
compactTopBar: false,
compactCommandBar: false,
compactMessageList: false,
compactReadingPane: false,
compactFolderPane: false,
narrowDateColumn: false,
compressComposeToolbar: false,
readingPaneMaxWidth: true,
},
compact: {
compactTopBar: true,
compactCommandBar: true,
compactMessageList: true,
compactReadingPane: true,
compactFolderPane: true,
narrowDateColumn: true,
compressComposeToolbar: true,
readingPaneMaxWidth: true,
},
'ultra-compact': {
compactTopBar: true,
compactCommandBar: true,
compactMessageList: true,
compactReadingPane: true,
compactFolderPane: true,
narrowDateColumn: true,
compressComposeToolbar: true,
readingPaneMaxWidth: true,
},
};
// Load settings from chrome.storage.sync, filling in defaults for missing keys
window.OutlookRelook.loadSettings = function () {
return new Promise((resolve) => {
chrome.storage.sync.get(window.OutlookRelook.DEFAULTS, (settings) => {
resolve(settings);
});
});
};
// Save a partial settings object to chrome.storage.sync
window.OutlookRelook.saveSettings = function (partial) {
return new Promise((resolve) => {
chrome.storage.sync.set(partial, resolve);
});
};