my code stock.com

Exibe a raridade dos pokémons/eggs na party de cada player.

Snippet options

Download: Download snippet as ph-show-party-rarity.js.
Copy snippet: For this you need a free my code stock.com account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!

// ==UserScript==
// @name         [Pokéheroes] Show Party Rarity
// @version      1.0.5
// @description  Displays the rarity on party
// @author       Jack Sparrow
// @match        http://pokeheroes.com/userprofile*
// @grant        none
// ==/UserScript==

// WARNING, CODE BELOW
var thisURL;var instance=0;$("#userp_box table").find("a[href^='pokemon?id=']").each(function(){thisURL=this.href;$(this).after('<div class="pkmn_rariry" style="display: block;"></div>');$(".pkmn_rariry").eq(instance).load(thisURL+"#pkmn_profile .poketable2",function(){var a;$(".pkmn_rariry").each(function(){a=$(this).text().trim();$(this).html(a.match(/easy|medium|hard|rare|starter|mysterious|unown|quest|event|special|retro|legend|ditto/i));if($(this).text().match(/mysterious|quest|special/i)){$(this).css({"background-color":"rgb(81, 171, 36)",color:"rgb(37, 78, 16)","text-shadow":"0 1px 0 #64CE2F"})}else{if($(this).text().match(/legend/i)){$(this).css({"background-color":"rgb(213, 8, 8)",color:"rgb(236, 181, 181)"})}else{if($(this).text().match(/ditto/i)){$(this).css({"background-color":"rgb(197, 123, 230)",color:"rgb(88, 48, 105)","text-shadow":"rgb(230, 170, 255) 0px 1px 0px"})}else{if($(this).text().match(/event/i)){$(this).css({"background-color":"rgb(225, 72, 40)",color:"rgb(116, 33, 15)","text-shadow":"0 1px 0 #FF785B"})}else{if($(this).text().match(/retro/i)){$(this).css({"background-color":"rgb(184, 128, 0)",color:"rgb(240, 208, 88)","text-shadow":"rgb(117, 85, 10) 0px 1px 0px"})}else{if($(this).text().match(/unown/i)){$(this).css({"background-color":"rgb(64, 64, 64)",color:"rgb(18, 18, 18)"})}}}}}}})});instance++});$(".pkmn_rariry").css({"border-radius":"4px",padding:"4px","background-color":"rgb(67, 119, 191)",color:"rgb(20, 47, 84)","font-weight":"bold","font-size":".9em",cursor:"default","-webkit-user-select":"none"});

Create a free my code stock.com account now.

my code stok.com is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!

Find out more and register now

You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.