MAM Ratio Protect

7/16/22 Warns about downloading based on resulting Ratio Loss due to forgetting to buy w/FL

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

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

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

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

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

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

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

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

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

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

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

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

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

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

作者
yyyzzz999
今日安裝
0
安裝總數
1,185
評價
4 0 0
版本
2.11
建立日期
2020-11-16
更新日期
2022-07-17
尺寸
23.7 KB
授權條款
MIT
腳本執行於

MAM Ratio Protect

Protects users from accidental hits to their upload/download ratio by setting thresholds for reminders to purchase a download as a personal freeleech. Thresholds can be configured for four levels of ratio damage severity, the highest of which disables the download button to prevent an accidental huge ratio loss.

Usage:
Simple note the change in the download button. Customize by editing the code.

Details:
This script only looks at MAM pages that provide a download button for a torrent. If the torrent is freeleech, it will do nothing. If it will affect your ratio, it will color code the download button to indicate four ranges of loss severity to your ratio by downloading with out purchasing it with a FL wedge first. These are:

Blue:   Ratio hit less than trivial (0.5 default)
Green:  Ratio hit trivial to moderate
Orange: Moderate or medium ration hit (1 default)
Red:    Protection threshold hit, button can optionally be disabled and "Download" becomes "FL Needed". (2 default)

The button text also changes with non-trivial loss from white to black for better contrast with bright colors, and the change is also easily seen by the colorblind.
The change in ratio is also listed right above the download button, which is more useful than the new ratio provided in the ratio box which requires looking in several places to determine significance.

Customizations:
This is a relatively simple script, so there is no fancy user settings menu.
The code is well commented with suggested customizations even a non-programmer should be able to handle.
Range boundaries can be edited on the lines with "if(rdiff".
If you never want to disable the download button, comment out the line after "Disable link to prevent download".

Version 2.00 Added dynamic favicons, and extra title information for mouse over tab views.
See the code history in the beta for details: https://greasyfork.org/en/scripts/418488-mam-ratio-protect-beta/versions
Version 1.91 Fixed size calculation error due to MAM changing units.
Version 1.8 Removes the View Calculations button and a needless ajax request it performed.
Version 1.7 Updates illustrated in the images below: