External links on steamcommunity.com

Includes links to external sites

  1. // ==UserScript==
  2. // @name External links on steamcommunity.com
  3. // @namespace http://steamcommunity.com/id/hlcs/
  4. // @version 1.0
  5. // @description Includes links to external sites
  6. // @author 2nd
  7. // @include /^https?:\/\/steamcommunity\.com[/]+(id|profiles)[/]+[^/]+(\/|)$/
  8. // @icon http://img-fotki.yandex.ru/get/6835/203537249.14/0_13878d_ee5e20a5_orig.png
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. $J(document).ready(function() {
  13.  
  14. var urls = {
  15. backpack: "http://backpack.tf/profiles/",
  16. tf2outpost: "http://www.tf2outpost.com/user/",
  17. steamrep: "http://steamrep.com/profiles/",
  18. mvmlobby: "http://mvmlobby.com/profile/"
  19. }
  20. favicons = "http://www.google.com/s2/favicons?domain=",
  21. $ = $J;
  22.  
  23. $(".header_real_name").append("<br>");
  24.  
  25. $.each(urls, function(_, s_url){
  26.  
  27. $(".header_real_name")
  28. .append(
  29. $("<a>")
  30. .attr({
  31. "href": s_url + g_rgProfileData.steamid,
  32. "target": "_blank"
  33. })
  34. .css({
  35. "display": "block",
  36. "float": "left",
  37. "background-color": "#34435A",
  38. "padding": "0px",
  39. "margin": "4px 0px",
  40. })
  41. .html(
  42. $("<img>")
  43. .attr("src", favicons + s_url)
  44. .css({
  45. "display": "block",
  46. "margin": "7px"
  47. })
  48. )
  49. .hover(
  50. function () {
  51. $(this).css("background-color", "#475E82");
  52. },
  53. function () {
  54. $(this).css("background-color", "#34435A");
  55. }
  56. )
  57. );
  58.  
  59. });
  60.  
  61. });