Show Rocket League Stats via Steam

Create a link in a user's steam profile to quickly see his stats Rocket League.

当前为 2017-07-05 提交的版本,查看 最新版本

// ==UserScript==
// @name		Show Rocket League Stats via Steam
// @namespace	steam
// @include		/https?:\/\/steamcommunity\.com\/id\/[^/]+\/?$/
// @description Create a link in a user's steam profile to quickly see his stats Rocket League.
// @version		1
// @author      @Glaived_Dev
// @licence     CC0 - Public Domain
// @grant		none
// ==/UserScript==

/**
 * @namespace
 * @property {object}  config
 * @property {object}  config.variables                   - Contains script configuration.
 * @property {string}  config.variables.siteForShowStats  - Site used to display statistics. "rocketleague.tracker.network" | "rocketleaguestats"
 */
config = function(){
	var variables = {
		siteForShowStats: "rocketleague.tracker.network",
	};

	function init(){};

	return {
		init: init,
		variables: variables,
	};
}();

/*******************************************************************************************************************************************************
 *******************************************************************************************************************************************************
 ****************************                                                                                               ****************************
 ****************************                                DO NOT MODIFY AFTER THIS LINE                                  ****************************
 ****************************                                                                                               ****************************
 *******************************************************************************************************************************************************
 *******************************************************************************************************************************************************
 */

id = window.location.href.replace("https://steamcommunity.com/id/", "");

if(id.substr(id.length - 1) == "/") id = id.slice(0, -1);

jQuery(document).ready(function(){
	console.log("%c INFO : Show Rocket League Stats via Steam script is running… ", "color: #3498db");

	if(config.variables.siteForShowStats == "rocketleaguestats")
		var url = "https://rocketleaguestats.com/profile/steam/";
	else if(config.variables.siteForShowStats == "rocketleague.tracker.network")
		var url = "https://rocketleague.tracker.network/profile/steam/";
	else
		var url = "https://rocketleague.tracker.network/profile/steam/";

	jQuery(".profile_item_links").prepend("<div class=\"profile_count_link ellipsis\">\
		<a target=\"_blank\" href=\""+url+id+"\">\
		<span class=\"count_link_label\">Show Rocket League stats</span>&nbsp;\
		</a>\
	</div>");
});

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址