Ver código fonte

fix: markdown anchor target

Sv443 1 ano atrás
pai
commit
2d32e96e5e
2 arquivos alterados com 5 adições e 1 exclusões
  1. 1 1
      changelog.md
  2. 4 0
      src/menu/menu_old.ts

+ 1 - 1
changelog.md

@@ -6,7 +6,7 @@
   - Use number keys to skip to a specific point in the song
   - Added feature to make volume slider bigger and volume control finer
   - Added percentage label next to the volume slider & title on hover
-  - Improvements to link hitboxes & more links in general (unfinished & buggy)
+  - Improvements to link hitboxes & more links in general
   - Permanent toast notifications can be automatically closed now
   - Remove tracking parameter `&si=...` from links in the share menu
   - Added an easter egg to the watermark and config menu option :)

+ 4 - 0
src/menu/menu_old.ts

@@ -894,6 +894,10 @@ async function addChangelogMenu() {
   menuBgElem.appendChild(menuContainer);
 
   document.body.appendChild(menuBgElem);
+
+  const anchors = document.querySelectorAll<HTMLAnchorElement>("#bytm-changelog-menu-text a");
+  for(const anchor of anchors)
+    anchor.target = "_blank";
 }
 
 /** Closes the changelog menu if it is open. If a bubbling event is passed, its propagation will be prevented. */