diff --git a/extension/content.js b/extension/content.js index 904d7e7..051b860 100644 --- a/extension/content.js +++ b/extension/content.js @@ -881,23 +881,23 @@ function ensureTrackerActionsContainer(container) { ).filter((node) => node && node.parentElement && node.parentElement !== actionsContainer); orphanActions.forEach((node) => actionsContainer.appendChild(node)); - // Keep action row last so status/content remains on its own row. - if (actionsContainer.parentElement === container) { - container.appendChild(actionsContainer); - } + const aiWrappers = Array.from(actionsContainer.querySelectorAll('.fb-tracker-ai-wrapper')); + aiWrappers.slice(1).forEach((duplicate) => duplicate.remove()); + + const webAppLinks = Array.from(actionsContainer.querySelectorAll('.fb-tracker-webapp-link')); + webAppLinks.slice(1).forEach((duplicate) => duplicate.remove()); actionsContainer.style.cssText = ` - margin-left: 0; - margin-top: 4px; - display: flex; + margin-left: auto; + margin-top: 0; + display: inline-flex; align-items: center; - justify-content: flex-start; + justify-content: flex-end; gap: 8px; - flex-wrap: wrap; + flex-wrap: nowrap; min-width: 0; - width: 100%; max-width: 100%; - flex: 0 0 100%; + flex: 0 1 auto; `; return actionsContainer;