Mathias' CSGOLounge W/L/C Bets

Allows you to calculate your W/L/C ratio on bets.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        Mathias' CSGOLounge W/L/C Bets
// @namespace   Mathias
// @description Allows you to calculate your W/L/C ratio on bets.
// @include     http://csgolounge.com/*
// @version     1.1
// @grant       none
// @require     http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
// ==/UserScript==
// ---- Wins & Losses @ Bets
var wAmounts = 0;
var lAmounts = 0;
var cAmounts = 0;
$('.button').click(function() {
});
$('.box-shiny').append("<a class='button' id='butt'>Calculate Bets</button>")
$('#butt').click(function() {
var wins = $('.won');
var losses = $('.lost');
var closed = $(".box span:not([class]), .box span[class='']");
closed.each(function() {
   cAmounts++; 
});
wins.each(function() {
    wAmounts++;
});
losses.each(function() {
   lAmounts++; 
});
if(wAmounts == 0 && lAmounts == 0) {
    $('#butt').html("Calculate Bets <font color='red' size='1'>Use this after you've clicked on Bet History!</font>");
} else {
    console.log('Wins: ' + wAmounts + ' Losses: ' + lAmounts + ' Closed: ' + cAmounts);
    $('#butt').html("Calculate Bets <font color='green'>" + wAmounts + "</font>/<font color='red'>" + lAmounts + "</font>" + "/<font color='grey'>" + cAmounts + "</font>");
    wAmounts = 0;
    lAmounts = 0;
    cAmounts = 0;
}
});