Newpunch visual coin progress

shows a cute progress bar behind your coin count thing

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Newpunch visual coin progress
// @namespace    https://greatest.deepsurf.us/en/scripts/369744-newpunch-visual-coin-progress
// @version      1.04
// @description  shows a cute progress bar behind your coin count thing
// @author       0xbbadbeef(Exploderguy)
// @match        https://forum.facepunch.com/*
// @grant        none
// @require      http://code.jquery.com/jquery-1.12.4.min.js
// ==/UserScript==

(function() {
    var coinElement = $("a[href='/user/shop']");

    if (!coinElement.length) return;

    var strProgress = coinElement.prop("title");
    var numProgress = strProgress.substr(strProgress.length - 3);

    //awfully dark/white/whatever
    var useColour = ($("div#toolbar").css("background-color") == "rgb(87, 33, 33)") ? "#6d5414" : "#a9b1bc";

    coinElement.prepend("<div id='coinProgress'></div>");
    $("div#coinProgress").css({
        "height" : numProgress,
        "background-color" : useColour,
        "position" : "absolute",
        "bottom" : "0px",
        "width" : "100%",
        "border-top": "1px solid black",
        "border-top-style" : "dashed",
        "z-index": "-1"
    })
    coinElement.css({
        "border" : "1px solid black"
    });
})();