dio-v
7/8/2015 - 11:28 AM

whatCDvideoSearch.user.js

// ==UserScript==
// @name         What CD video/ last.fm search
// @namespace    http://diovayne.nl/
// @version      0.31
// @description  To directly search for video on google of the album or artist on last.fm
// @author       Dio Vayne
// @match        https://what.cd/*
// @grant        none
// ==/UserScript==

$('.dioSearchAlbum').remove();
$('.group_info').each(function(){
	var vT = $(this);
	var vArtist = encodeURIComponent(vT.find('strong').first().find('a').first().text());
	var vAlbum = encodeURIComponent(vT.find('strong').first().find('a:nth-child(2)').text());
	vT.append("<a class='dioSearchAlbum' target='_blank' href='https://www.google.nl/search?q=\""+vArtist+"\"+\""+vAlbum+"\"+album&tbm=vid'>search video</a> | <a class='dioSearchLastfm' target='_blank' href='http://www.last.fm/music/"+vArtist+"'>search last.fm</a>");
});