From 66adb470ad60b65a188c75f6597a80a807cfc1e2 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 30 Jun 2021 00:55:57 +0200 Subject: [PATCH] optional progressbar tint --- copyparty/web/browser.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 32fa4a21..6540339b 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -237,6 +237,10 @@ var mpl = (function () { '📂 next-folder' + '' + + '

tint

' + + '' + + '
' + + '

audio equalizer

'); var r = { @@ -290,6 +294,19 @@ var mpl = (function () { draw_pb_mode(); } + function set_tint() { + var tint = icfg_get('pb_tint', 0); + if (!tint) + ebi('barbuf').style.removeProperty('background'); + else + ebi('barbuf').style.background = 'rgba(126,163,75,' + (tint / 100.0) + ')'; + } + ebi('pb_tint').oninput = function (e) { + swrite('pb_tint', this.value); + set_tint(); + }; + set_tint(); + r.pp = function () { if (!r.os_ctl) return;