ANT Buffer Size

ANT Buffer Size Calculator

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        ANT Buffer Size
// @namespace   Violentmonkey Scripts
// @match       https://anthelion.me/*
// @version     1.2 (23/02/2024)
// @author      ANThusiast
// @description ANT Buffer Size Calculator
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    var targetLiId = 'stats_seeding';
    var targetLiLeechId = 'stats_leeching';
    var requiredRatio = 'stats_required';


    var targetLi = document.getElementById(targetLiId);
    var targetLiLeech = document.getElementById(targetLiLeechId);
    var targetLiRequiredRatio = document.getElementById(requiredRatio);

    if (targetLi) {
        var uploadValue = parseFloat(targetLi.querySelector('.stat.tooltip').textContent);
        var requiredRatioValue = parseFloat(targetLiRequiredRatio.querySelector('.stat.tooltip').textContent);
        var multiplierValue = (1 / requiredRatioValue);
        var bufferValue = (uploadValue * multiplierValue).toFixed(2);
        var bufferLi = document.createElement('li');
        bufferLi.innerHTML = '<a href="https://anthelion.me/wiki.php?action=article&name=ratio">Buffer</a>: <span class="stat tooltip">' + bufferValue + '</span> TiB';
        targetLiLeech.parentNode.insertBefore(bufferLi, targetLiLeech.nextSibling);
    }
})();