// ==UserScript== // @name Musicbrainz UI enhancements // @description Various UI enhancements for Musicbrainz // @version 2026.02.07.4 // @downloadURL https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/master/mb_ui_enhancements.user.js // @updateURL https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/master/mb_ui_enhancements.user.js // @icon http://wiki.musicbrainz.org/-/images/3/3d/Musicbrainz_logo.png // @namespace http://userscripts.org/users/22504 // @match https://*musicbrainz.org/* // @match http://*musicbrainz.org/* // @run-at document-start // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.js // @require https://raw.github.com/murdos/mbediting.js/master/mbediting.js // @resource copyIcon https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/master/assets/icons/copy.svg // @resource checkIcon https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/master/assets/icons/check.svg // @resource errorIcon https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/master/assets/icons/error.svg // @resource searchIcon https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/master/assets/icons/search.svg // @resource searchArtistIcon https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/master/assets/icons/search-artist.svg // @grant GM_getResourceURL // @grant GM_registerMenuCommand // @grant GM_getValue // @grant GM_setValue // ==/UserScript== // prevent JQuery conflicts, see http://wiki.greasespot.net/@grant this.$ = this.jQuery = jQuery.noConflict(true); // Copy release title: menu command to enable/disable (default enabled) function setCopyTitleMenu() { if (typeof GM_registerMenuCommand !== 'function') return; GM_registerMenuCommand( `${GM_getValue('copyTitleEnabled', true) ? '☑' : '☐'} Copy release title button`, function () { GM_setValue('copyTitleEnabled', !GM_getValue('copyTitleEnabled', true)); setCopyTitleMenu(); }, { autoClose: false, id: 'copyTitle' }, ); } setCopyTitleMenu(); // Google search release title: menu command to enable/disable (default enabled) function setGoogleSearchMenu() { if (typeof GM_registerMenuCommand !== 'function') return; GM_registerMenuCommand( `${GM_getValue('googleSearchEnabled', true) ? '☑' : '☐'} Google search release title buttons`, function () { GM_setValue('googleSearchEnabled', !GM_getValue('googleSearchEnabled', true)); setGoogleSearchMenu(); }, { autoClose: false, id: 'googleSearch' }, ); } setGoogleSearchMenu(); $(document).ready(function () { // Follow the instructions found at https://www.last.fm/api/authentication // then paste your API Key between the single quotes in the variable below. const LASTFM_APIKEY = ''; // Highlight table rows $('head').append( '', ); let re; // Top tracks from Last.fm re = new RegExp('musicbrainz.org/artist/([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})$', 'i'); if (LASTFM_APIKEY && window.location.href.match(re)) { $('h2.discography').before('

Top Last.fm recordings