您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
This extension simply calculates the required seeding time and displays it in the hours seeded box. Colors Ratio accordingly. Many other QOL features to come. - This is not affiliated with Avistaz. At all. -
当前为
// ==UserScript== // @name Avistaz + // @version 1.3 // @description This extension simply calculates the required seeding time and displays it in the hours seeded box. Colors Ratio accordingly. Many other QOL features to come. - This is not affiliated with Avistaz. At all. - // @author Improved Avistaz // @match https://avistaz.to/profile/*/history* // @grant none // @run-at document-end // @namespace http://your-namespace.com // ==/UserScript== function AddedSeeding() { document.querySelectorAll('tbody > tr').forEach(el => { const cells = el.querySelectorAll('td'); const rawDownload = cells[6].querySelector('.text-red').textContent; const Seededtimeraw = cells[10].querySelector('span').getAttribute('data-original-title'); const Seedingtimeraw = Seededtimeraw.match(/(\d+(\.\d+)?)/g); const Seedingtime = Math.ceil(parseInt(Seedingtimeraw) / 60); var Match = rawDownload.match(/(\d+(\.\d+)?)\s*(GB|MB|KB|TB|B)\b/i); if (Match) { var DownloadedGB = parseFloat(Match[1]); var unit = Match[3]; if (unit === "TB") DownloadedGB *= 1024; if (unit === "GB") DownloadedGB = DownloadedGB; if (unit === "MB") DownloadedGB /= 1024; if (unit === "KB") DownloadedGB /= 1024 **2 ; } else Match = "0"; if (DownloadedGB === 0) var result = "0"; if (DownloadedGB <= 1) result = 72; if (DownloadedGB > 1 && DownloadedGB < 50) result = 72 + 2 * DownloadedGB; if (DownloadedGB > 50) result = 100 * Math.log(DownloadedGB) - 219.2023; result = Math.ceil(result); var difference = result - Seedingtime; const appendedValue = Seedingtime; const cellToModify = cells[10]; const textToDisplay = Seedingtime + 'h / ' + result + 'h'; cellToModify.textContent = textToDisplay; Seedingtime > result ? cellToModify.style.color = 'green' : cellToModify.style.color = 'lightcoral'; }); } AddedSeeding(); // Many thanks to the kind person that showed interest in this code!