SystemReqs - FPS Color Grading

Restores the expected FPS cell colors.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name        SystemReqs - FPS Color Grading
// @namespace   https://greasyfork.org/en/scripts/436903-systemreqs-fps-color-grading
// @version     1.1.0
// @author      CML99
// @description Restores the expected FPS cell colors.
// @license     CC-BY-NC-SA-4.0
// @homepageURL https://greasyfork.org/en/scripts/436903-systemreqs-fps-color-grading
// @supportURL  https://greasyfork.org/en/scripts/436903-systemreqs-fps-color-grading/feedback
// @match       https://gamesystemrequirements.com/*
// @match       https://gepigeny.hu/*
// @match       https://systemanforderungen.com/*
// @match       https://systemreqs.com/*
// @icon        https://gepig.com/favicons/favicon-32x32.png
// ==/UserScript==

$( ".srbr_cell:contains('60+ fps')" ).css( "background-color", "#050" );
$( ".srbr_cell:contains('60 fps')" ).css( "background-color", "#051" );
$( ".srbr_cell:contains('55 fps')" ).css( "background-color", "#052" );
$( ".srbr_cell:contains('50 fps')" ).css( "background-color", "#041" );
$( ".srbr_cell:contains('45 fps')" ).css( "background-color", "#041" );
$( ".srbr_cell:contains('40 fps')" ).css( "background-color", "#240" );
$( ".srbr_cell:contains('35 fps')" ).css( "background-color", "#230" );
$( ".srbr_cell:contains('30 fps')" ).css( "background-color", "#330" );
$( ".srbr_cell:contains('25 fps')" ).css( "background-color", "#430" );
$( ".srbr_cell:contains('20 fps')" ).css( "background-color", "#520" );
$( ".srbr_cell:contains('15 fps')" ).css( "background-color", "#510" );
$( ".srbr_cell:contains('-')" ).css( "background-color", "#400" );

(function () {
    'use strict';
    var words = {
        'rejtett' : 'private',
    '':''};

    //////////////////////////////////////////////////////////////////////////////
    // This is where the real code is
    // Don't edit below this
    //////////////////////////////////////////////////////////////////////////////
 
    var regexs = [], replacements = [],
        tagsWhitelist = ['PRE', 'BLOCKQUOTE', 'CODE', 'INPUT', 'BUTTON', 'TEXTAREA'],
        rIsRegexp = /^\/(.+)\/([gim]+)?$/,
        word, text, texts, i, userRegexp;
 
    // prepareRegex by JoeSimmons
    // used to take a string and ready it for use in new RegExp()
    function prepareRegex(string) {
        return string.replace(/([\[\]\^\&\$\.\(\)\?\/\\\+\{\}\|])/g, '\\$1');
    }
 
    // function to decide whether a parent tag will have its text replaced or not
    function isTagOk(tag) {
        return tagsWhitelist.indexOf(tag) === -1;
    }
 
    delete words['']; // so the user can add each entry ending with a comma,
                      // I put an extra empty key/value pair in the object.
                      // so we need to remove it before continuing
 
    // convert the 'words' JSON object to an Array
    for (word in words) {
        if ( typeof word === 'string' && words.hasOwnProperty(word) ) {
            userRegexp = word.match(rIsRegexp);
 
            // add the search/needle/query
            if (userRegexp) {
                regexs.push(
                    new RegExp(userRegexp[1], 'g')
                );
            } else {
                regexs.push(
                    new RegExp(prepareRegex(word).replace(/\\?\*/g, function (fullMatch) {
                        return fullMatch === '\\*' ? '*' : '[^ ]*';
                    }), 'g')
                );
            }
 
            // add the replacement
            replacements.push( words[word] );
        }
    }
 
    // do the replacement
    texts = document.evaluate('//body//text()[ normalize-space(.) != "" ]', document, null, 6, null);
    for (i = 0; text = texts.snapshotItem(i); i += 1) {
        if ( isTagOk(text.parentNode.tagName) ) {
            regexs.forEach(function (value, index) {
                text.data = text.data.replace( value, replacements[index] );
            });
        }
    }
 
}());