feat: MutationObserver for dynamic element suppression
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user