GreasyFork Total Scripts(modified)

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

Versione datata 18/12/2021. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name             GreasyFork Total Scripts(modified)
// @namespace        pxgamer
// @version          0.2.2
// @description      Shows a user's total scripts count on GreasyFork(modified).
// @author           NotYou
// @include          *greasyfork.org/*/users/*
// @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
 */

(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);">  [' + 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);">  [' + 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);">  [' + 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);">  [' + 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);">  [' + 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);">  [' + 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);">  [' + l + ' Total Scripts]</span>');
    }
    else {
        $('div.sidebarred-main-content h3:first').append('<span style="font-size: 15px;color: rgb(213, 79, 79);">  [ Unexpected error! ]</span>');
    }
})();