« get me outta code hell

userstuff: switch hsmusic websites: fix some path extraction - dotfiles - Miscellaneous configuration files of my personal use
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-08-14 17:56:51 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-08-14 17:56:51 -0300
commit51bf3754cc4805e016ea6f93e00872260e665265 (patch)
tree3b322cfafd892e30fca80914129cbb73a758550e
parente4d3a731b88858774330292b039716a969f0644c (diff)
userstuff: switch hsmusic websites: fix some path extraction HEAD main
-rw-r--r--userstuff/hsmusic/Switch HSMusic websites.user.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/userstuff/hsmusic/Switch HSMusic websites.user.js b/userstuff/hsmusic/Switch HSMusic websites.user.js
index 47c2d0b..a36a138 100644
--- a/userstuff/hsmusic/Switch HSMusic websites.user.js
+++ b/userstuff/hsmusic/Switch HSMusic websites.user.js
@@ -59,12 +59,12 @@ customNavLink('L', 'http://localhost:8002');
 customNavLink('P', 'https://preview.hsmusic.wiki');
 customNavLink('R', 'https://hsmusic.wiki');
 
-let match = location.href.match(/album\/([^/]*)/);
+let match = location.href.match(/\/album\/([^/]*)/);
 if (match) {
     customNavLink('G', () => `https://github.com/hsmusic/hsmusic-data/tree/preview/album/${match[1]}.yaml`);
 }
 
-match = location.href.match(/track\/([^/]*)/);
+match = location.href.match(/\/track\/([^/]*)/);
 if (match) {
     const directory = getComputedStyle(document.body).getPropertyValue('--album-directory');
     customNavLink('G', () => `https://github.com/hsmusic/hsmusic-data/tree/preview/album/${directory}.yaml`);