Force tracker actions onto dedicated second row

This commit is contained in:
2026-02-26 01:05:22 +01:00
parent 7ac681b089
commit 8cc3da9d45

View File

@@ -875,16 +875,29 @@ function ensureTrackerActionsContainer(container) {
container.appendChild(actionsContainer); container.appendChild(actionsContainer);
} }
// Pull any legacy/orphan action elements into the single canonical actions container.
const orphanActions = Array.from(
container.querySelectorAll('.fb-tracker-ai-wrapper, .fb-tracker-webapp-link')
).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);
}
actionsContainer.style.cssText = ` actionsContainer.style.cssText = `
margin-left: auto; margin-left: 0;
margin-top: 4px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-start;
gap: 8px; gap: 8px;
flex-wrap: wrap; flex-wrap: wrap;
min-width: 0; min-width: 0;
width: 100%;
max-width: 100%; max-width: 100%;
flex: 1 1 auto; flex: 0 0 100%;
`; `;
return actionsContainer; return actionsContainer;
@@ -6287,6 +6300,7 @@ async function addAICommentButton(container, postElement) {
transition: transform 0.2s ease, box-shadow 0.2s ease; transition: transform 0.2s ease, box-shadow 0.2s ease;
flex: 0 1 auto; flex: 0 1 auto;
max-width: 100%; max-width: 100%;
white-space: nowrap;
`; `;
const button = document.createElement('button'); const button = document.createElement('button');