ReSteam

Tweaks to make Steam look nicer!

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         ReSteam
// @namespace    http://pyroglyph.co.uk/
// @version      1.0
// @description  Tweaks to make Steam look nicer!
// @author       Pyroglyph
// @match        http://store.steampowered.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Remove ugly background gradients/glows
    document.getElementsByClassName('game_page_background')[0].style.background = '';
    document.getElementsByClassName('game_background_glow')[0].style.background = 'rgba(0,0,0,0)';

    // Add new fonts to page
    var styleNode = document.createElement('style');
    var textNode = document.createTextNode('@import url("https://fonts.googleapis.com/css?family=Prompt|Nunito");');
    styleNode.appendChild(textNode);
    document.head.appendChild(styleNode);

    // Replace all fonts with nicer ones
    var elems = document.getElementsByTagName('*');
    for (var i = 0; i < elems.length; i++) {
        var style = window.getComputedStyle(elems[i]);

        if (style.fontFamily.includes('Motiva')) {
            elems[i].style.setProperty('font-family','\'Prompt\', sans-serif');
        }
        else {
            elems[i].style.setProperty('font-family','\'Nunito\', sans-serif');
        }
    }

    // Make themed backgrounds for store pages
    if (window.location.href.includes('/app/')) {
        var imageSrc = document.getElementsByClassName('game_header_image_full')[0].src;
        var bgNode = document.createElement('img');
        bgNode.src = imageSrc;
        bgNode.style = 'position:fixed;top:0px;left:0px;height:100%;width:auto;z-index:-100;filter:opacity(.2)blur(64px);';
        document.body.appendChild(bgNode);
    }
})();