Steam FACEIT links

Show FACEIT links on Steam profile

目前为 2023-09-22 提交的版本。查看 最新版本

// ==UserScript==
// @name         Steam FACEIT links
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Show FACEIT links on Steam profile
// @author       ultraviewer
// @license      MIT
// @match        https://steamcommunity.com/id/*
// @match        https://steamcommunity.com/profiles/*
// @grant        none
// @run-at       document-idle
// ==/UserScript==

(function() {
    'use strict';

    try {
        document.querySelectorAll('.profile_item_links')[0].innerHTML += '<div id="faceit-links"></div><div style="clear: left;"></div>';
    } catch (e) {
        // private profile
        document.querySelectorAll('.profile_rightcol')[0].innerHTML += '<div id="faceit-links"></div><div style="clear: left;"></div>';
    }

    let id = window.g_rgProfileData.steamid;
    let links = [
        {title: 'FACEIT', url: `https://www.faceit.com/en/search/overview/${id}`},
        {title: 'FaceItFinder', url: `https://faceitfinder.com/stats/${id}`},
        {title: 'CSStats.gg', url: `https://csstats.gg/player/${id}/faceit#/matches`}
    ];
    for (let l of links) {
        document.getElementById('faceit-links').innerHTML += `<div class="profile_count_link"><a href="${l.url}">${l.title}<span class="profile_count_link_total"></span></a></div>`;
    }
})();