« get me outta code hell

client: remove dead artist tooltip reference code - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-11-29 17:32:08 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-11-29 17:32:08 -0400
commit7ad62ef4a6908a550d5b48ae93877446088d4d82 (patch)
tree4741b66959d50333c40e9fb3cb0b8037bc7e9086
parent7215aef076f9734f35dc4f25e54fbe2371630c5f (diff)
client: remove dead artist tooltip reference code
-rw-r--r--src/static/client3.js92
1 files changed, 0 insertions, 92 deletions
diff --git a/src/static/client3.js b/src/static/client3.js
index 86b5f985..1e64ebe1 100644
--- a/src/static/client3.js
+++ b/src/static/client3.js
@@ -2015,98 +2015,6 @@ function addExternalIconTooltipPageListeners() {
 clientSteps.getPageReferences.push(getExternalIconTooltipReferences);
 clientSteps.addPageListeners.push(addExternalIconTooltipPageListeners);
 
-/*
-const linkIconTooltipInfo =
-  Array.from(document.querySelectorAll('span.contribution.has-tooltip'))
-    .map(span => ({
-      mainLink: span.querySelector('a'),
-      iconsContainer: span.querySelector('span.icons-tooltip'),
-      iconLinks: span.querySelectorAll('span.icons-tooltip a'),
-    }));
-
-for (const info of linkIconTooltipInfo) {
-  const focusElements =
-    [info.mainLink, ...info.iconLinks];
-
-  const hoverElements =
-    [info.mainLink, info.iconsContainer];
-
-  let hidden = true;
-
-  const show = () => {
-    info.iconsContainer.classList.add('visible');
-    info.iconsContainer.inert = false;
-    hidden = false;
-  };
-
-  const hide = () => {
-    info.iconsContainer.classList.remove('visible');
-    info.iconsContainer.inert = true;
-    hidden = true;
-  };
-
-  const considerHiding = () => {
-    if (hoverElements.some(el => el.matches(':hover'))) {
-      return;
-    }
-
-    if (<document.activeElement is inside tooltip>) {
-      return;
-    }
-
-    if (justTouched) {
-      return;
-    }
-
-    hide();
-  };
-
-  // Hover (pointer)
-
-  let hoverTimeout;
-
-  info.mainLink.addEventListener('mouseenter', () => {
-    if (hidden) {
-      hoverTimeout = setTimeout(show, 250);
-    }
-  });
-
-  info.mainLink.addEventListener('mouseout', () => {
-    if (hidden) {
-      clearTimeout(hoverTimeout);
-    } else {
-      considerHiding();
-    }
-  });
-
-  info.iconsContainer.addEventListener('mouseout', () => {
-    if (!hidden) {
-      considerHiding();
-    }
-  });
-
-  // Focus (keyboard)
-
-  let focusTimeout;
-
-  info.mainLink.addEventListener('focus', () => {
-    focusTimeout = setTimeout(show, 750);
-  });
-
-  info.mainLink.addEventListener('blur', () => {
-    clearTimeout(focusTimeout);
-  });
-
-  info.iconsContainer.addEventListener('focusout', () => {
-    requestAnimationFrame(considerHiding);
-  });
-
-  info.mainLink.addEventListener('blur', () => {
-    requestAnimationFrame(considerHiding);
-  });
-}
-*/
-
 // Sticky commentary sidebar ------------------------------
 
 const albumCommentarySidebarInfo = clientInfo.albumCommentarySidebarInfo = {