Greasy Fork

RYM google current album

open a google search window for the current artist and album

目前为 2014-10-23 提交的版本。查看 最新版本

// ==UserScript==
// @name        RYM google current album
// @description	open a google search window for the current artist and album
// @namespace   https://greasyfork.org/en/scripts/5966-rym-google-current-album  
// @include     http://rateyourmusic.com/release/*
// @version     1.6
// @grant       none
// ==/UserScript==

var btn1 = $('<button>Google This</button>').click(function () {
  var tit = $(".album_title").text().trim();
  var name = $($(".artist")[0]).text();
  console.log(name);
  window.open('https://google.com?q="' + tit + '" "' + name + '"','_blank');
});

$($(".album_title").siblings(0)[0]).append(btn1);

var btn2 = $('<button>Google Blog This</button>').click(function () {
  var tit = $(".album_title").text().trim();
  var name = $(".artist").text();
  console.log(name);
  window.open('https://google.com?q="' + tit + '" "' + name + '"&tbm=blg','_blank');
});

$($(".album_title").siblings(0)[0]).append(btn2);