// ==UserScript== // @name Musicbrainz UI enhancements // @description Various UI enhancements for Musicbrainz // @version 2015.02.14.2 // @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 https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js // @require https://raw.github.com/murdos/mbediting.js/master/mbediting.js // ==/UserScript== function addJQuery(callback) {var script = document.createElement("script");script.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js");script.addEventListener('load', function() {var script = document.createElement("script");script.textContent = "(" + callback.toString() + ")();";document.body.appendChild(script);}, false);document.body.appendChild(script);}addJQuery(main); function main() { LASTFM_APIKEY = null; jQuery.noConflict(); (function ($) { // -------------- Start of script ------------------------ // 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