Userscript idea: dropdown menus

I’ve had this idea for a userscript banging around in my head for a few weeks now, but I know nearly nothing about how to write my own userscripts. So I figured I’d put the idea out there and maybe someone with a bigger brain than mine can pick it up.

The idea is to add drop down menus to MusicBrainz entity links, similar to the drop down menus that appear on the top of every MB page.

image

Here’s a basic description of how the script should work/look:

  • Enable a drop down menu on every MB entity link while holding a key (shift)
  • When shift is held, entity URLs (like artist, label, release, recording, etc) have a drop down menu enabled overlaid on top of the actual clickable link.
  • This overlay disables actually clicking on the URL, so it can be clicked on without going to its normal destination.
  • The drop down menu should behave similarly to the drop down menus that appear when clicking on “My data”, “About us”, “Editing” at the top of every MB page.
  • The overlay should only appear when hovering over a URL while holding shift.
  • When holding shift while not hovering over a URL, nothing happens.
  • Once the menu is open, we don’t need to keep holding shift, nor keep the mouse inside the menu.
  • The drop down menu options should behave like any other link, so if we right click it, we get the normal web browser context menu, if we middle click it, it opens the link in a new tab, etc.
  • When shift is held, the hovered-over URL should have a slightly off color background to show that the script works.
  • When shift-hovering over a link, include a small down arrow next to it, again, similar to the “My data”, “Editing” menus.
  • Once the overlay is clicked, the drop down menu appears with multiple options.
  • When clicking somewhere else on the page, the overlay should close, just like the top-of-page drop down menus already do.

And the list of options is where my idea ends. Personally, I’d want different entities to have different drop down options, so for example, if we open the drop down menu for an artist URL, we would see:
1 - Overview (just a link to the artist page)
2 - Recordings
3 - Works
4 - Relationships
5 - Edit
6 - Open edits
7 - Editing history

But I imagine different people would want different options, so ideally I would include some way for the drop down menus to be customizable for every person, but I don’t know how feasible that would be.

I feel like this userscript would be a huge QoL improvement for a lot of people. I often find myself having to go back and forth opening pages/tabs to fetch certain things, like having to open an artist’s recordings page, to look for existing recordings before adding a new release, or having to cite an earlier edit made to a release by a different editor, I have to open the release page, wait for it to load, then open the edit history and fetch the thing I want. I’m sure some of the more active editors can see how this would help them out.

4 Likes

It would be great.
Maybe could be part of MBS code, even.
I wanted to do that, but 8 years ago, already!
So I guess I will never find time to do it.

If you don’t know that COOL ENTITY LINKS, it’s only working on entity links in annotations and edit notes (and in chat logs, etc.), and only providing 3 links: Open edits, Edit history, Edit.

I could not add these links to all entity links of MB site, specifically because it’s not a popup, it’s inline, and it would break MB website design, too much, adding lots of cluttering links.

3 Likes

yep, i’ve been rocking mb. COOL ENTITY LINKS for a while along with a myriad of other userscripts of yours (all very cool tyty!!)

image

And yeah, I figured that if the drop down options only appear while holding a key (shift) + clicking, it would not add any clutter to the website design

2 Likes