浏览代码

fix: markdown anchor target

Sv443 1 年之前
父节点
当前提交
2d32e96e5e
共有 2 个文件被更改,包括 5 次插入1 次删除
  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. */