mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
global element variable
This commit is contained in:
parent
3410f91d3f
commit
2bb45a9463
1 changed files with 6 additions and 3 deletions
|
@ -12,8 +12,11 @@
|
||||||
|
|
||||||
const UseGlobalLimit = -2;
|
const UseGlobalLimit = -2;
|
||||||
const NoLimit = -1;
|
const NoLimit = -1;
|
||||||
|
let limitReachedActionsEl;
|
||||||
|
|
||||||
window.addEventListener("DOMContentLoaded", (event) => {
|
window.addEventListener("DOMContentLoaded", (event) => {
|
||||||
|
limitReachedActionsEl = document.getElementById("limitReachedActions");
|
||||||
|
|
||||||
window.addEventListener("keydown", (event) => {
|
window.addEventListener("keydown", (event) => {
|
||||||
switch (event.key) {
|
switch (event.key) {
|
||||||
case "Enter":
|
case "Enter":
|
||||||
|
@ -67,7 +70,7 @@
|
||||||
document.getElementById("inactiveMinutes").value = values.inactiveSeedingTimeLimit;
|
document.getElementById("inactiveMinutes").value = values.inactiveSeedingTimeLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById("limitReachedActions").value = values.shareLimitAction.toString();
|
limitReachedActionsEl.value = values.shareLimitAction.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
shareLimitChanged();
|
shareLimitChanged();
|
||||||
|
@ -96,7 +99,7 @@
|
||||||
ratioLimitValue = document.getElementById("setRatio").checked ? document.getElementById("ratio").value : -1;
|
ratioLimitValue = document.getElementById("setRatio").checked ? document.getElementById("ratio").value : -1;
|
||||||
seedingTimeLimitValue = document.getElementById("setTotalMinutes").checked ? document.getElementById("totalMinutes").value : -1;
|
seedingTimeLimitValue = document.getElementById("setTotalMinutes").checked ? document.getElementById("totalMinutes").value : -1;
|
||||||
inactiveSeedingTimeLimitValue = document.getElementById("setInactiveMinutes").checked ? document.getElementById("inactiveMinutes").value : -1;
|
inactiveSeedingTimeLimitValue = document.getElementById("setInactiveMinutes").checked ? document.getElementById("inactiveMinutes").value : -1;
|
||||||
shareLimitActionValue = document.getElementById("limitReachedActions").value;
|
shareLimitActionValue = limitReachedActionsEl.value;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return;
|
return;
|
||||||
|
@ -146,7 +149,7 @@
|
||||||
document.getElementById("setRatio").disabled = !customShareLimit;
|
document.getElementById("setRatio").disabled = !customShareLimit;
|
||||||
document.getElementById("setTotalMinutes").disabled = !customShareLimit;
|
document.getElementById("setTotalMinutes").disabled = !customShareLimit;
|
||||||
document.getElementById("setInactiveMinutes").disabled = !customShareLimit;
|
document.getElementById("setInactiveMinutes").disabled = !customShareLimit;
|
||||||
document.getElementById("limitReachedActions").disabled = !customShareLimit;
|
limitReachedActionsEl.disabled = !customShareLimit;
|
||||||
|
|
||||||
enableInputBoxes();
|
enableInputBoxes();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue