Greasy Fork

Greasy Fork is available in English.

RYM google current album

open a google search window for the current artist and album

当前为 2014-10-23 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

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

var btn1 = $('<button>Google This</button>').click(function () {
  var tit = $(".album_title").text().trim();
  var name = $("span[itemProp='byArtist']").text();
  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 = $("span[itemProp='byArtist']").text();
  window.open('https://google.com?q="' + tit + '" "' + name + '"&tbm=blg','_blank');
});
$($(".album_title").siblings(0)[0]).append(btn2);
// @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(' + 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(' + tit + '" "' + name + '"&tbm=blg','_blank');
});

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