feat: Options tab in popup + Safari build script

Popup:
- Added 5th "Options" tab with key settings accessible without
  opening the full options page: secret scanning, auto-detect PPI,
  auto-redact, show highlights, document scan preview
- "Open Full Options Page" button for sync/encryption/org/import
- Settings changes in popup immediately broadcast to content scripts

Safari:
- Added build-safari.sh that uses Apple's safari-web-extension-converter
  to generate an Xcode project from the Firefox build
- browser-polyfill.js already handles Safari (uses browser.* like Firefox)

https://claude.ai/code/session_01SWSwDfMVij53bCTNSCLMwn
This commit is contained in:
Claude
2026-03-27 03:11:49 +00:00
parent 66f408713c
commit 04372ab561
4 changed files with 173 additions and 1 deletions
+29 -1
View File
@@ -208,12 +208,40 @@ async function initUnlockedUI() {
});
});
// Options link
// Options link (footer)
$('#btnOptions').addEventListener('click', (e) => {
e.preventDefault();
api.runtime.openOptionsPage();
});
// Options tab
$('#btnOpenFullOptions').addEventListener('click', () => {
api.runtime.openOptionsPage();
});
// Load options tab settings
$('#optSecretScanning').checked = settings.secretScanning !== false;
$('#optAutoDetect').checked = settings.autoDetect !== false;
$('#optAutoRedact').checked = settings.autoRedactDetected !== false;
$('#optHighlights').checked = settings.showHighlights || false;
$('#optDocPreview').checked = settings.docScanPreview !== false;
// Options tab change handlers
const optHandlers = [
['optSecretScanning', 'secretScanning'],
['optAutoDetect', 'autoDetect'],
['optAutoRedact', 'autoRedactDetected'],
['optHighlights', 'showHighlights'],
['optDocPreview', 'docScanPreview'],
];
for (const [id, key] of optHandlers) {
$(`#${id}`).addEventListener('change', async (e) => {
settings[key] = e.target.checked;
await Storage.saveSettings({ [key]: e.target.checked });
api.runtime.sendMessage({ type: 'update:settings', settings });
});
}
// Update privacy note based on encryption state
const encEnabled = await Storage._isAtRestEncryptionEnabled();
const encNote = $('#privacyEncNote');