feat: MutationObserver for dynamic element suppression

This commit is contained in:
Joel Brock
2026-04-23 08:58:45 -07:00
parent 95eb177754
commit 7826046f76
2 changed files with 144 additions and 1 deletions

View File

@@ -89,6 +89,15 @@
applySettingsToDOM(settings);
injectThemeCSS(settings.theme);
// Start the MutationObserver
OR.Observer.start(settings);
// Apply behavior patches
OR.Behavior.start(settings);
// Start DOM injector (quick actions)
OR.Injector.start(settings);
// Listen for setting changes from popup
chrome.storage.onChanged.addListener((changes, area) => {
if (area !== 'sync') return;
@@ -97,6 +106,15 @@
OR.loadSettings().then((updated) => {
applySettingsToDOM(updated);
// Update observer with new settings
OR.Observer.updateSettings(updated);
// Update behavior patches
OR.Behavior.updateSettings(updated);
// Update injector
OR.Injector.updateSettings(updated);
// Swap theme CSS if theme changed
if (changes.theme) {
injectThemeCSS(changes.theme.newValue);