Last active
August 19, 2019 22:08
-
-
Save diogomartino/ac17a717d4df42012c42f84011754740 to your computer and use it in GitHub Desktop.
Steam Background Previewer tampermonkey script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Steam Background Previewer | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Preview steam backgrounds on your profile | |
// @author Diogo Martino | |
// @include /(?:https?:\/\/)?steamcommunity\.com\/(?:profiles|id)\/[a-zA-Z0-9]+/ | |
// @grant none | |
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js | |
// ==/UserScript== | |
/* | |
Some of the functions of steamcommunity.com might not work anymore. Use it only in your profile, then disable it. | |
*/ | |
(function () { | |
'use strict'; | |
$(window).on("load", function(){ | |
var url = new URL(window.location.href); | |
var background = url.searchParams.get("bg"); | |
if (background) { | |
$(".no_header.profile_page.has_profile_background").css("background-image", "url(" + background + ")"); | |
$(".profile_background_image_content ").css("background-image", "url(" + background + ")"); | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment