fix android-chrome layout glitch in up2k

This commit is contained in:
ed
2021-06-18 23:38:43 +02:00
parent 51d14a6b4d
commit 57579b2fe5
3 changed files with 26 additions and 11 deletions

View File

@@ -2042,8 +2042,8 @@ function despin(sel) {
}
function apply_perms(perms) {
perms = perms || [];
function apply_perms(newperms) {
perms = newperms || [];
var o = QSA('#ops>a[data-perm], #u2footfoot');
for (var a = 0; a < o.length; a++) {
@@ -2065,8 +2065,16 @@ function apply_perms(perms) {
var have_write = has(perms, "write"),
have_read = has(perms, "read"),
de = document.documentElement,
tds = QSA('#u2conf td');
/* good idea maybe
clmod(de, "read", have_read);
clmod(de, "write", have_write);
clmod(de, "nread", !have_read);
clmod(de, "nwrite", !have_write);
*/
for (var a = 0; a < tds.length; a++) {
tds[a].style.display =
(have_write || tds[a].getAttribute('data-perm') == 'read') ?
@@ -2360,7 +2368,7 @@ var light;
light = bcfg_get('lightmode', false);
function freshen() {
document.documentElement.setAttribute("class", light ? "light" : "");
clmod(document.documentElement, "light", light);
pbar.drawbuf();
pbar.drawpos();
vbar.draw();