Last active
August 29, 2015 14:24
-
-
Save DioVayne/db7f3779bf511b844d5f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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>"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment