Created
September 20, 2012 16:04
-
-
Save anonymous/3756792 to your computer and use it in GitHub Desktop.
This file contains 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 RYM Cover | |
// @namespace http://http://rateyourmusic.com/~eighteensecond | |
// @version 0.5 | |
// @description creates link to google with "[artist][albumname] cover" query | |
// @include http://rateyourmusic.com/release/* | |
// @copyright 2011+, 18ths | |
// ==/UserScript== | |
var album = document.getElementById("album_page_hdr").innerHTML; | |
var artist = document.getElementsByClassName("artist")[0].innerHTML; | |
var node = document.getElementsByClassName("shortcut")[0]; | |
var lnk = document.createElement("a"); | |
lnk.setAttribute("target", "_blank"); | |
lnk.setAttribute("href", "http://www.google.com/images?q=%22" + album + "%22 " + "%22" +artist + "%22" + " Cover"); | |
lnk.style.fontSize = "x-small"; | |
var lnk_content = document.createTextNode(" Cover"); | |
lnk.appendChild(lnk_content); | |
var parentDiv = node.parentNode; | |
parentDiv.insertBefore(lnk, node); | |
var salto = document.createElement("br"); | |
parentDiv.insertBefore(salto, node); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment