Skip to content

Instantly share code, notes, and snippets.

Created September 20, 2012 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3756751 to your computer and use it in GitHub Desktop.
Save anonymous/3756751 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name RYM Reviews
// @namespace http://http://rateyourmusic.com/~eighteensecond
// @version 0.5
// @description creates link to google with "[artist][albumname] 320 kps" 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" + " Review");
lnk.style.fontSize = "x-small";
var lnk_content = document.createTextNode(" Reviews");
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