diff --git a/content-script.js b/content-script.js
index cfbda10..a3818b6 100644
--- a/content-script.js
+++ b/content-script.js
@@ -285,44 +285,10 @@
return;
}
+ mount?.remove();
hcmTile?.remove();
-
- const header = document.querySelector(SELECTORS.header);
- const functionsContainer = header?.querySelector(SELECTORS.functions);
- const anchor = functionsContainer ? findUserAnchor(functionsContainer) : null;
-
- if (!header || !functionsContainer) {
- return;
- }
-
- ensureStyles();
-
- const themedMount = mount ?? createMount();
- const overlay = ensureModal();
-
- applyTheme(header, functionsContainer, anchor, themedMount, overlay);
-
- const targetSibling = resolveInsertionTarget(
- functionsContainer,
- anchor,
- themedMount
- );
-
- if (
- themedMount.parentElement !== functionsContainer ||
- themedMount.nextElementSibling !== targetSibling
- ) {
- const verifiedTarget =
- targetSibling && targetSibling.parentElement === functionsContainer
- ? targetSibling
- : null;
-
- if (verifiedTarget) {
- functionsContainer.insertBefore(themedMount, verifiedTarget);
- } else {
- functionsContainer.appendChild(themedMount);
- }
- }
+ removeModal();
+ unlockScroll();
}
function createMount() {
@@ -507,7 +473,8 @@
if (
action === "calendar-prev" ||
action === "calendar-next" ||
- action === "calendar-today"
+ action === "calendar-today" ||
+ action === "toggle-sidebar"
) {
return `[data-action="${action}"]`;
}
@@ -559,14 +526,6 @@
${getHeaderSummary()}
-