External links on steamcommunity.com

Includes links to external sites

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         External links on steamcommunity.com
// @namespace    http://steamcommunity.com/id/hlcs/
// @version      1.0
// @description  Includes links to external sites
// @author       2nd
// @include      /^https?:\/\/steamcommunity\.com[/]+(id|profiles)[/]+[^/]+(\/|)$/
// @icon         http://img-fotki.yandex.ru/get/6835/203537249.14/0_13878d_ee5e20a5_orig.png
// @grant        none
// ==/UserScript==

$J(document).ready(function() {

  var urls = {
        backpack: "http://backpack.tf/profiles/",
        tf2outpost: "http://www.tf2outpost.com/user/",
        steamrep: "http://steamrep.com/profiles/",
        mvmlobby: "http://mvmlobby.com/profile/"
      }
      favicons = "http://www.google.com/s2/favicons?domain=",
      $ = $J;

  $(".header_real_name").append("<br>");

  $.each(urls, function(_, s_url){

    $(".header_real_name")
      .append(
        $("<a>")
          .attr({
            "href": s_url + g_rgProfileData.steamid,
            "target": "_blank"
          })
          .css({
            "display": "block",
            "float": "left",
            "background-color": "#34435A",
            "padding": "0px",
            "margin": "4px 0px",
          })
          .html(
            $("<img>")
              .attr("src", favicons + s_url)
              .css({
                "display": "block",
                "margin": "7px"
              })
          )
          .hover(
            function () {
              $(this).css("background-color", "#475E82");
            },
            function () {
              $(this).css("background-color", "#34435A");
            }
          )
      );

  });

});