Update browser.js

Signed-off-by: ed <s@ocv.me>
This commit is contained in:
ed 2026-05-20 22:26:27 +00:00 committed by GitHub
parent 514b246478
commit 35c7873d8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4145,6 +4145,8 @@ var fileman = (function () {
if (this.textContent == 'write-only')
for (var a = 0; a < pbtns.length; a++)
clmod(pbtns[a], 'on', pbtns[a].textContent == 'write');
if (this.textContent == 'get' && clgot(this, 'on') && has(perms, 'read'))
clmod(pbtns[0], 'on');
}
clmod(pbtns[0], 'on', 1);
@ -8032,22 +8034,18 @@ function apply_perms(res) {
a.style.display = '';
tt.att(QS('#ops'));
// read implies get, no need to show it
var displayed_perms = perms.slice(0);
var have_read = has(displayed_perms, 'read')
if (have_read) {
var get_index = displayed_perms.indexOf('get');
if (get_index > -1) {
displayed_perms.splice(get_index, 1);
}
}
var v_perms = perms.slice(0);
var have_read = has(perms, 'read');
if (have_read)
apop(v_perms, 'get');
for (var a = 0; a < chk.length; a++)
if (has(displayed_perms, chk[a]))
if (has(v_perms, chk[a]))
axs.push(chk[a].slice(0, 1).toUpperCase() + chk[a].slice(1));
axs = axs.join('-');
if (displayed_perms.length == 1) {
if (v_perms.length == 1) {
aclass = ' class="warn">';
axs += '-Only';
}