116 lines
3.1 KiB
JavaScript
116 lines
3.1 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,
|
|
|
|
// 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);
|
|
});
|
|
};
|