mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 01:22:13 -06:00
minor cleanup
This commit is contained in:
parent
74d07426b3
commit
08a8ebed17
|
@ -423,18 +423,14 @@ function MPlayer() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
r.vol = sread('vol');
|
r.vol = clamp(fcfg_get('vol', 0.5), 0, 1);
|
||||||
if (r.vol !== null)
|
|
||||||
r.vol = parseFloat(r.vol);
|
|
||||||
else
|
|
||||||
r.vol = 0.5;
|
|
||||||
|
|
||||||
r.expvol = function (v) {
|
r.expvol = function (v) {
|
||||||
return 0.5 * v + 0.5 * v * v;
|
return 0.5 * v + 0.5 * v * v;
|
||||||
};
|
};
|
||||||
|
|
||||||
r.setvol = function (vol) {
|
r.setvol = function (vol) {
|
||||||
r.vol = Math.max(Math.min(vol, 1), 0);
|
r.vol = clamp(vol, 0, 1);
|
||||||
swrite('vol', vol);
|
swrite('vol', vol);
|
||||||
r.stopfade(true);
|
r.stopfade(true);
|
||||||
|
|
||||||
|
@ -2955,9 +2951,7 @@ var treectl = (function () {
|
||||||
prev_winh = null,
|
prev_winh = null,
|
||||||
dyn = bcfg_get('dyntree', true),
|
dyn = bcfg_get('dyntree', true),
|
||||||
dots = bcfg_get('dotfiles', false),
|
dots = bcfg_get('dotfiles', false),
|
||||||
treesz = icfg_get('treesz', 16);
|
treesz = clamp(icfg_get('treesz', 16), 4, 50);
|
||||||
|
|
||||||
treesz = Math.min(Math.max(treesz, 4), 50);
|
|
||||||
|
|
||||||
treectl.entree = function (e) {
|
treectl.entree = function (e) {
|
||||||
ev(e);
|
ev(e);
|
||||||
|
|
Loading…
Reference in a new issue