View difference between Paste ID: SsCrsc1b and PYNrAsUx
SHOW: | | - or go back to the newest paste.
1
// ==UserScript==
2
// @name rdiablo-tooltips
3
// @namespace rdiablo
4
// @description Blizzard's D3 class, skill, and item tooltips.
5
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js
6
// @include http://*.reddit.com/r/diablo/*
7
// ==/UserScript==
8
9
$.getScript("http://us.battle.net/d3/static/js/tooltips.js");
10
11
// Change all /item links to valid battle.net links
12
$('a[href="/item"]').each(function(){
13
	var name = $(this).text().replace(' ', '-').toLowerCase();
14
	$(this).attr('href', 'http://us.battle.net/d3/en/item/' + name);
15
});
16
17
// Change all /skill links to valid battle.net links
18-
var skills = {"berserker rage":"barbarian/passive/berserker-rage","rapid fire":"demon-hunter/active/rapid-fire","spectral blade":"wizard/active/spectral-blade","vermin":"witch-doctor/passive/vermin","near death experience":"monk/passive/near-death-experience","ancient spear":"barbarian/active/ancient-spear","unstable anomaly":"wizard/passive/unstable-anomaly","horrify":"witch-doctor/active/horrify","fan of knives":"demon-hunter/active/fan-of-knives","pound of flesh":"barbarian/passive/pound-of-flesh","spirit barrage":"witch-doctor/active/spirit-barrage","nerves of steel":"barbarian/passive/nerves-of-steel","grenadier":"demon-hunter/passive/grenadier","prodigy":"wizard/passive/prodigy","chakram":"demon-hunter/active/chakram","strafe":"demon-hunter/active/strafe","blinding flash":"monk/active/blinding-flash","corpse spiders":"witch-doctor/active/corpse-spiders","electrocute":"wizard/active/electrocute","evasive fire":"demon-hunter/active/evasive-fire","storm armor":"wizard/active/storm-armor","soul harvest":"witch-doctor/active/soul-harvest","familiar":"wizard/active/familiar","relentless":"barbarian/passive/relentless","furious charge":"barbarian/active/furious-charge","ice armor":"wizard/active/ice-armor","dashing strike":"monk/active/dashing-strike","cull the weak":"demon-hunter/passive/cull-the-weak","chant of resonance":"monk/passive/chant-of-resonance","plague of toads":"witch-doctor/active/plague-of-toads","resolve":"monk/passive/resolve","firebomb":"witch-doctor/active/firebomb","bola shot":"demon-hunter/active/bola-shot","elemental arrow":"demon-hunter/active/elemental-arrow","sharpshooter":"demon-hunter/passive/sharpshooter","pacifism":"monk/passive/pacifism","war cry":"barbarian/active/war-cry","slow time":"wizard/active/slow-time","perfectionist":"demon-hunter/passive/perfectionist","multishot":"demon-hunter/active/multishot","breath of heaven":"monk/active/breath-of-heaven","boon of bul-kathos":"barbarian/passive/boon-of-bul-kathos","whirlwind":"barbarian/active/whirlwind","energy twister":"wizard/active/energy-twister","shadow power":"demon-hunter/active/shadow-power","exalted soul":"monk/passive/exalted-soul","exploding palm":"monk/active/exploding-palm","magic weapon":"wizard/active/magic-weapon","entangling shot":"demon-hunter/active/entangling-shot","ballistics":"demon-hunter/passive/ballistics","crippling wave":"monk/active/crippling-wave","grenades":"demon-hunter/active/grenades","weapons master":"barbarian/passive/weapons-master","sprint":"barbarian/active/sprint","ground stomp":"barbarian/active/ground-stomp","mantra of retribution":"monk/active/mantra-of-retribution","weapon throw":"barbarian/active/weapon-throw","arcane torrent":"wizard/active/arcane-torrent","ruthless":"barbarian/passive/ruthless","one with everything":"monk/passive/one-with-everything","steady aim":"demon-hunter/passive/steady-aim","numbing traps":"demon-hunter/passive/numbing-traps","mantra of conviction":"monk/active/mantra-of-conviction","juggernaut":"barbarian/passive/juggernaut","blur":"wizard/passive/blur","zombie charger":"witch-doctor/active/zombie-charger","zombie handler":"witch-doctor/passive/zombie-handler","power hungry":"wizard/passive/power-hungry","spirit walk":"witch-doctor/active/spirit-walk","revenge":"barbarian/active/revenge","shock pulse":"wizard/active/shock-pulse","virtuoso":"wizard/passive/virtuoso","hot pursuit":"demon-hunter/passive/hot-pursuit","smoke screen":"demon-hunter/active/smoke-screen","acid cloud":"witch-doctor/active/acid-cloud","hammer of the ancients":"barbarian/active/hammer-of-the-ancients","temporal flux":"wizard/passive/temporal-flux","superstition":"barbarian/passive/superstition","earthquake":"barbarian/active/earthquake","fists of thunder":"monk/active/fists-of-thunder","cleave":"barbarian/active/cleave","fetish army":"witch-doctor/active/fetish-army","tough as nails":"barbarian/passive/tough-as-nails","paralysis":"wizard/passive/paralysis","wave of light":"monk/active/wave-of-light","mystic ally":"monk/active/mystic-ally","seize the initiative":"monk/passive/seize-the-initiative","serenity":"monk/active/serenity","spike trap":"demon-hunter/active/spike-trap","vault":"demon-hunter/active/vault","summon zombie dogs":"witch-doctor/active/summon-zombie-dogs","grasp of the dead":"witch-doctor/active/grasp-of-the-dead","circle of life":"witch-doctor/passive/circle-of-life","wrath of the berserker":"barbarian/active/wrath-of-the-berserker","conflagration":"wizard/passive/conflagration","blizzard":"wizard/active/blizzard","tempest rush":"monk/active/tempest-rush","explosive blast":"wizard/active/explosive-blast","evocation":"wizard/passive/evocation","transcendence":"monk/passive/transcendence","no escape":"barbarian/passive/no-escape","locust swarm":"witch-doctor/active/locust-swarm","arcane dynamo":"wizard/passive/arcane-dynamo","galvanizing ward":"wizard/passive/galvanizing-ward","archon":"wizard/active/archon","mass confusion":"witch-doctor/active/mass-confusion","rend":"barbarian/active/rend","grave injustice":"witch-doctor/passive/grave-injustice","big bad voodoo":"witch-doctor/active/big-bad-voodoo","vision quest":"witch-doctor/passive/vision-quest","astral presence":"wizard/passive/astral-presence","poison dart":"witch-doctor/active/poison-dart","disintegrate":"wizard/active/disintegrate","the guardian's path":"monk/passive/the-guardian's-path","hex":"witch-doctor/active/hex","sixth sense":"monk/passive/sixth-sense","overpower":"barbarian/active/overpower","hydra":"wizard/active/hydra","bloodthirst":"barbarian/passive/bloodthirst","bash":"barbarian/active/bash","brawler":"barbarian/passive/brawler","critical mass":"wizard/passive/critical-mass","hungering arrow":"demon-hunter/active/hungering-arrow","fierce loyalty":"witch-doctor/passive/fierce-loyalty","ignore pain":"barbarian/active/ignore-pain","fundamentals":"demon-hunter/passive/fundamentals","guiding light":"monk/passive/guiding-light","frost nova":"wizard/active/frost-nova","illusionist":"wizard/passive/illusionist","custom engineering":"demon-hunter/passive/custom-engineering","death trance":"witch-doctor/passive/death-trance","cluster arrow":"demon-hunter/active/cluster-arrow","fleet footed":"monk/passive/fleet-footed","threatening shout":"barbarian/active/threatening-shout","unforgiving":"barbarian/passive/unforgiving","tactical advantage":"demon-hunter/passive/tactical-advantage","pierce the veil":"witch-doctor/passive/pierce-the-veil","sweeping wind":"monk/active/sweeping-wind","sentry":"demon-hunter/active/sentry","bad medicine":"witch-doctor/passive/bad-medicine","preparation":"demon-hunter/active/preparation","call of the ancients":"barbarian/active/call-of-the-ancients","inner sanctuary":"monk/active/inner-sanctuary","impale":"demon-hunter/active/impale","way of the hundred fists":"monk/active/way-of-the-hundred-fists","ray of frost":"wizard/active/ray-of-frost","mantra of evasion":"monk/active/mantra-of-evasion","gruesome feast":"witch-doctor/passive/gruesome-feast","diamond skin":"wizard/active/diamond-skin","seven-sided strike":"monk/active/seven-sided-strike","spirit vessel":"witch-doctor/passive/spirit-vessel","haunt":"witch-doctor/active/haunt","wave of force":"wizard/active/wave-of-force","cyclone strike":"monk/active/cyclone-strike","caltrops":"demon-hunter/active/caltrops","night stalker":"demon-hunter/passive/night-stalker","rain of vengeance":"demon-hunter/active/rain-of-vengeance","energy armor":"wizard/active/energy-armor","jungle fortitude":"witch-doctor/passive/jungle-fortitude","gargantuan":"witch-doctor/active/gargantuan","teleport":"wizard/active/teleport","battle rage":"barbarian/active/battle-rage","mirror image":"wizard/active/mirror-image","combination strike":"monk/passive/combination-strike","thrill of the hunt":"demon-hunter/passive/thrill-of-the-hunt","lashing tail kick":"monk/active/lashing-tail-kick","wall of zombies":"witch-doctor/active/wall-of-zombies","black ice":"wizard/passive/black-ice","meteor":"wizard/active/meteor","marked for death":"demon-hunter/active/marked-for-death","rush of essence":"witch-doctor/passive/rush-of-essence","seismic slam":"barbarian/active/seismic-slam","inspiring presence":"barbarian/passive/inspiring-presence","glass cannon":"wizard/passive/glass-cannon","sacrifice":"witch-doctor/active/sacrifice","companion":"demon-hunter/active/companion","spiritual attunement":"witch-doctor/passive/spiritual-attunement","brooding":"demon-hunter/passive/brooding","vengeance":"demon-hunter/passive/vengeance","deadly reach":"monk/active/deadly-reach","arcane orb":"wizard/active/arcane-orb","tribal rites":"witch-doctor/passive/tribal-rites","animosity":"barbarian/passive/animosity","magic missile":"wizard/active/magic-missile","archery":"demon-hunter/passive/archery","blood ritual":"witch-doctor/passive/blood-ritual","leap attack":"barbarian/active/leap-attack","mantra of healing":"monk/active/mantra-of-healing","fetish sycophants":"witch-doctor/passive/fetish-sycophants","frenzy":"barbarian/active/frenzy","firebats":"witch-doctor/active/firebats"};
18+
var skills = {"bash":"barbarian/active/bash","hammer of the ancients":"barbarian/active/hammer-of-the-ancients","cleave":"barbarian/active/cleave","ground stomp":"barbarian/active/ground-stomp","rend":"barbarian/active/rend","leap":"barbarian/active/leap","ancient spear":"barbarian/active/ancient-spear","frenzy":"barbarian/active/frenzy","seismic slam":"barbarian/active/seismic-slam","revenge":"barbarian/active/revenge","weapon throw":"barbarian/active/weapon-throw","sprint":"barbarian/active/sprint","threatening shout":"barbarian/active/threatening-shout","earthquake":"barbarian/active/earthquake","whirlwind":"barbarian/active/whirlwind","furious charge":"barbarian/active/furious-charge","battle rage":"barbarian/active/battle-rage","ignore pain":"barbarian/active/ignore-pain","call of the ancients":"barbarian/active/call-of-the-ancients","overpower":"barbarian/active/overpower","war cry":"barbarian/active/war-cry","wrath of the berserker":"barbarian/active/wrath-of-the-berserker","pound of flesh":"barbarian/passive/pound-of-flesh","ruthless":"barbarian/passive/ruthless","nerves of steel":"barbarian/passive/nerves-of-steel","weapons master":"barbarian/passive/weapons-master","berserker rage":"barbarian/passive/berserker-rage","inspiring presence":"barbarian/passive/inspiring-presence","bloodthirst":"barbarian/passive/bloodthirst","animosity":"barbarian/passive/animosity","superstition":"barbarian/passive/superstition","tough as nails":"barbarian/passive/tough-as-nails","no escape":"barbarian/passive/no-escape","relentless":"barbarian/passive/relentless","brawler":"barbarian/passive/brawler","juggernaut":"barbarian/passive/juggernaut","unforgiving":"barbarian/passive/unforgiving","boon of bul-kathos":"barbarian/passive/boon-of-bul-kathos","magic missile":"wizard/active/magic-missile","ray of frost":"wizard/active/ray-of-frost","shock pulse":"wizard/active/shock-pulse","frost nova":"wizard/active/frost-nova","arcane orb":"wizard/active/arcane-orb","diamond skin":"wizard/active/diamond-skin","wave of force":"wizard/active/wave-of-force","spectral blade":"wizard/active/spectral-blade","arcane torrent":"wizard/active/arcane-torrent","energy twister":"wizard/active/energy-twister","ice armor":"wizard/active/ice-armor","electrocute":"wizard/active/electrocute","slow time":"wizard/active/slow-time","storm armor":"wizard/active/storm-armor","explosive blast":"wizard/active/explosive-blast","magic weapon":"wizard/active/magic-weapon","disintegrate":"wizard/active/disintegrate","hydra":"wizard/active/hydra","familiar":"wizard/active/familiar","teleport":"wizard/active/teleport","meteor":"wizard/active/meteor","mirror image":"wizard/active/mirror-image","blizzard":"wizard/active/blizzard","energy armor":"wizard/active/energy-armor","archon":"wizard/active/archon","blur":"wizard/passive/blur","power hungry":"wizard/passive/power-hungry","evocation":"wizard/passive/evocation","glass cannon":"wizard/passive/glass-cannon","prodigy":"wizard/passive/prodigy","astral presence":"wizard/passive/astral-presence","illusionist":"wizard/passive/illusionist","cold blooded":"wizard/passive/cold-blooded","conflagration":"wizard/passive/conflagration","paralysis":"wizard/passive/paralysis","galvanizing ward":"wizard/passive/galvanizing-ward","temporal flux":"wizard/passive/temporal-flux","critical mass":"wizard/passive/critical-mass","arcane dynamo":"wizard/passive/arcane-dynamo","unstable anomaly":"wizard/passive/unstable-anomaly","poison dart":"witch-doctor/active/poison-dart","grasp of the dead":"witch-doctor/active/grasp-of-the-dead","corpse spiders":"witch-doctor/active/corpse-spiders","summon zombie dogs":"witch-doctor/active/summon-zombie-dogs","firebats":"witch-doctor/active/firebats","horrify":"witch-doctor/active/horrify","soul harvest":"witch-doctor/active/soul-harvest","plague of toads":"witch-doctor/active/plague-of-toads","haunt":"witch-doctor/active/haunt","sacrifice":"witch-doctor/active/sacrifice","zombie charger":"witch-doctor/active/zombie-charger","spirit walk":"witch-doctor/active/spirit-walk","spirit barrage":"witch-doctor/active/spirit-barrage","gargantuan":"witch-doctor/active/gargantuan","firebomb":"witch-doctor/active/firebomb","locust swarm":"witch-doctor/active/locust-swarm","acid cloud":"witch-doctor/active/acid-cloud","hex":"witch-doctor/active/hex","mass confusion":"witch-doctor/active/mass-confusion","big bad voodoo":"witch-doctor/active/big-bad-voodoo","wall of zombies":"witch-doctor/active/wall-of-zombies","fetish army":"witch-doctor/active/fetish-army","circle of life":"witch-doctor/passive/circle-of-life","jungle fortitude":"witch-doctor/passive/jungle-fortitude","spiritual attunement":"witch-doctor/passive/spiritual-attunement","gruesome feast":"witch-doctor/passive/gruesome-feast","bad medicine":"witch-doctor/passive/bad-medicine","blood ritual":"witch-doctor/passive/blood-ritual","zombie handler":"witch-doctor/passive/zombie-handler","pierce the veil":"witch-doctor/passive/pierce-the-veil","fetish sycophants":"witch-doctor/passive/fetish-sycophants","spirit vessel":"witch-doctor/passive/spirit-vessel","rush of essence":"witch-doctor/passive/rush-of-essence","vision quest":"witch-doctor/passive/vision-quest","fierce loyalty":"witch-doctor/passive/fierce-loyalty","grave injustice":"witch-doctor/passive/grave-injustice","tribal rites":"witch-doctor/passive/tribal-rites","fists of thunder":"monk/active/fists-of-thunder","lashing tail kick":"monk/active/lashing-tail-kick","deadly reach":"monk/active/deadly-reach","blinding flash":"monk/active/blinding-flash","tempest rush":"monk/active/tempest-rush","breath of heaven":"monk/active/breath-of-heaven","dashing strike":"monk/active/dashing-strike","crippling wave":"monk/active/crippling-wave","wave of light":"monk/active/wave-of-light","exploding palm":"monk/active/exploding-palm","cyclone strike":"monk/active/cyclone-strike","way of the hundred fists":"monk/active/way-of-the-hundred-fists","serenity":"monk/active/serenity","seven-sided strike":"monk/active/seven-sided-strike","mantra of evasion":"monk/active/mantra-of-evasion","mantra of retribution":"monk/active/mantra-of-retribution","sweeping wind":"monk/active/sweeping-wind","inner sanctuary":"monk/active/inner-sanctuary","mystic ally":"monk/active/mystic-ally","mantra of healing":"monk/active/mantra-of-healing","mantra of conviction":"monk/active/mantra-of-conviction","fleet footed":"monk/passive/fleet-footed","resolve":"monk/passive/resolve","exalted soul":"monk/passive/exalted-soul","transcendence":"monk/passive/transcendence","chant of resonance":"monk/passive/chant-of-resonance","seize the initiative":"monk/passive/seize-the-initiative","the guardian's path":"monk/passive/the-guardian's-path","sixth sense":"monk/passive/sixth-sense","pacifism":"monk/passive/pacifism","beacon of ytar":"monk/passive/beacon-of-ytar","guiding light":"monk/passive/guiding-light","one with everything":"monk/passive/one-with-everything","combination strike":"monk/passive/combination-strike","near death experience":"monk/passive/near-death-experience","hungering arrow":"demon-hunter/active/hungering-arrow","impale":"demon-hunter/active/impale","entangling shot":"demon-hunter/active/entangling-shot","caltrops":"demon-hunter/active/caltrops","rapid fire":"demon-hunter/active/rapid-fire","smoke screen":"demon-hunter/active/smoke-screen","vault":"demon-hunter/active/vault","bola shot":"demon-hunter/active/bola-shot","chakram":"demon-hunter/active/chakram","preparation":"demon-hunter/active/preparation","evasive fire":"demon-hunter/active/evasive-fire","grenades":"demon-hunter/active/grenades","shadow power":"demon-hunter/active/shadow-power","companion":"demon-hunter/active/companion","fan of knives":"demon-hunter/active/fan-of-knives","spike trap":"demon-hunter/active/spike-trap","strafe":"demon-hunter/active/strafe","elemental arrow":"demon-hunter/active/elemental-arrow","marked for death":"demon-hunter/active/marked-for-death","multishot":"demon-hunter/active/multishot","sentry":"demon-hunter/active/sentry","cluster arrow":"demon-hunter/active/cluster-arrow","rain of vengeance":"demon-hunter/active/rain-of-vengeance","tactical advantage":"demon-hunter/passive/tactical-advantage","thrill of the hunt":"demon-hunter/passive/thrill-of-the-hunt","vengeance":"demon-hunter/passive/vengeance","steady aim":"demon-hunter/passive/steady-aim","cull the weak":"demon-hunter/passive/cull-the-weak","night stalker":"demon-hunter/passive/night-stalker","brooding":"demon-hunter/passive/brooding","hot pursuit":"demon-hunter/passive/hot-pursuit","archery":"demon-hunter/passive/archery","numbing traps":"demon-hunter/passive/numbing-traps","perfectionist":"demon-hunter/passive/perfectionist","custom engineering":"demon-hunter/passive/custom-engineering","grenadier":"demon-hunter/passive/grenadier","sharpshooter":"demon-hunter/passive/sharpshooter","ballistics":"demon-hunter/passive/ballistics"};
19
$('a[href="/skill"]').each(function(){
20
	var name = $(this).text().toLowerCase();
21
	if (skills[name])
22
		$(this).attr('href', 'http://us.battle.net/d3/en/class/' + skills[name]);
23
});
24
25
// Add the chat gem n shiz
26
$('body').append('<div id="chat-gem"></div>');
27
$('body').append('<div id="chat-gem-info"></div>');
28
$('#chat-gem-info').hide();
29
$('#chat-gem').live("click", function(e){
30
	if ($(this).hasClass('clicked'))
31
	{
32
		$(this).removeClass('clicked');
33
		$('#chat-gem-info').html('Gem Deactivated');
34
	}
35
	else
36
	{
37
		$(this).addClass('clicked');
38
		$('#chat-gem-info').html('Gem Activated');
39
	}
40
	$('#chat-gem-info').stop().fadeTo(600, 1.0, function(){
41
		$(this).delay(500).fadeTo(900, 0.0);
42
	});
43
});