Show FACEIT links on Steam profile
目前為
// ==UserScript==
// @name Steam FACEIT links
// @namespace http://tampermonkey.net/
// @version 1.3
// @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';
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', url: `https://csstats.gg/player/${id}?platforms=FACEIT#/matches`}
];
let profile = document.querySelector('.profile_item_links') ?? document.querySelector('.profile_rightcol');
profile.innerHTML += '<div id="faceit-links"></div><div style="clear: left;"></div>';
let anchor = document.getElementById('faceit-links');
for (let l of links) {
anchor.innerHTML += `<div class="profile_count_link ellipsis"></div>`;
anchor.lastChild.innerHTML += `<a href="${l.url}" target="_blank" style="color: orange;"></a>`;
anchor.lastChild.lastChild.innerHTML += `<span class="count_link_label">${l.title}</span>`;
anchor.lastChild.lastChild.innerHTML += `<span class="profile_count_link_total"> </span>`;
}
})();