// ==UserScript== // @name Musicbrainz UI enhancements // @description Various UI enhancements for Musicbrainz // @version 2018.2.18.1 // @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 // @include http*://*musicbrainz.org/* // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.js // @require https://raw.github.com/murdos/mbediting.js/master/mbediting.js // ==/UserScript== // prevent JQuery conflicts, see http://wiki.greasespot.net/@grant this.$ = this.jQuery = jQuery.noConflict(true); $(document).ready(function () { LASTFM_APIKEY = null; // Highlight table rows $('table.tbl tbody tr').hover( function () { $(this).children('td').each(function(){ var backgroundColor = $(this).css("backgroundColor"); if (backgroundColor != 'rgb(255, 255, 0)') $(this).css("backgroundColor", "#ffeea8"); }); }, function () { $(this).children('td').each(function(){ var backgroundColor = $(this).css("backgroundColor"); if (backgroundColor != 'rgb(255, 255, 0)') $(this).css("backgroundColor", ""); }); } ); var re; // Top tracks from Lastfm 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