Created
September 20, 2012 15:57
-
-
Save anonymous/3756766 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 Hola Teddy | |
// @namespace http://http://rateyourmusic.com/~eighteensecond | |
// @version 0.5 | |
// @description creates link to google with "[artist][albumname] busca gatitos" 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/search?q=%22" + album + "%22 " + "%22" +artist + "%22" + " gatitos"); | |
lnk.style.fontSize = "x-small"; | |
var lnk_content = document.createTextNode("Hola Teddy this release"); | |
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