GreasyFork Total Scripts(modified)

Shows a user's total scripts count on GreasyFork(modified).

As of 2021-12-20. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name              GreasyFork Total Scripts(modified)
// @namespace    pxgamer
// @version            0.2.3
// @description     Shows a user's total scripts count on GreasyFork(modified).
// @author             NotYou
// @include            *greasyfork.org/*/users/*
// @require             https://code.jquery.com/jquery-1.7.2.min.js
// @license            GPLv3
// @license-link     https://www.gnu.org/licenses/gpl-3.0.txt
// @grant                none
// ==/UserScript==

/* What's New?:
 * - All languagees support (https://greasyfork.org/en/scripts/20343-greasyfork-total-scripts/discussions/15913)
 * - Displaying near "Scripts"
 * - Colours change parallel to the number count
 * - jQuery bug fix
 */

(function() {
    'use strict';

    let l = $('li[data-script-id]').length;
    if (l == 1) {
        $('div.sidebarred-main-content h3:first').append('<span style="font-size: 15px;color: rgb(191, 191, 191);font-variant: normal;">  [' + l + ' Total Script]</span>');
    }
    else if(l >= 100) {
        $('div.sidebarred-main-content h3:first').append('<span style="font-size: 15px;color: rgb(185, 16, 16);font-variant: normal;">  [' + l + ' Total Scripts]</span>');
    }
    else if(l >= 50) {
        $('div.sidebarred-main-content h3:first').append('<span style="font-size: 15px;color: rgb(185, 87, 16);font-variant: normal;">  [' + l + ' Total Scripts]</span>');
    }
    else if(l >= 25) {
        $('div.sidebarred-main-content h3:first').append('<span style="font-size: 15px;color: rgb(185, 159, 16);font-variant: normal;">  [' + l + ' Total Scripts]</span>');
    }
    else if(l >= 10) {
        $('div.sidebarred-main-content h3:first').append('<span style="font-size: 15px;color: rgb(21, 185, 16);font-variant: normal;">  [' + l + ' Total Scripts]</span>');
    }
    else if(l >= 5) {
        $('div.sidebarred-main-content h3:first').append('<span style="font-size: 15px;color: rgb(16, 185, 153);font-variant: normal;">  [' + l + ' Total Scripts]</span>');
    }
    else if(l > 1) {
        $('div.sidebarred-main-content h3:first').append('<span style="font-size: 15px;color: rgb(16, 42, 185);font-variant: normal;">  [' + l + ' Total Scripts]</span>');
    }
    else {
        $('div.sidebarred-main-content h3:first').append('<span style="font-size: 15px;color: rgb(213, 79, 79);font-variant: normal;">  [ Unexpected error! ]</span>');
    }
})();