Newpunch visual coin progress

shows a cute progress bar behind your coin count thing

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

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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         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"
    });
})();