From a473e5e19a547fc5953542aef4d50cb6446d2a9a Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 27 Jun 2022 17:24:30 +0200 Subject: [PATCH] always include custom css/js --- copyparty/httpcli.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 6120a452..36e5a327 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -2403,6 +2403,16 @@ class HttpCli(object): "themes": self.args.themes, "turbolvl": self.args.turbo, } + + if self.args.js_browser: + j2a["js"] = self.args.js_browser + + if self.args.css_browser: + j2a["css"] = self.args.css_browser + + if not self.conn.hsrv.prism: + j2a["no_prism"] = True + if not self.can_read: if is_ls: return self.tx_ls(ls_ret) @@ -2602,9 +2612,6 @@ class HttpCli(object): if doctxt is not None: j2a["doc"] = doctxt - if not self.conn.hsrv.prism: - j2a["no_prism"] = True - for d in dirs: d["name"] += "/" @@ -2616,19 +2623,12 @@ class HttpCli(object): else: j2a["files"] = dirs + files - j2a["logues"] = logues j2a["taglist"] = taglist j2a["txt_ext"] = self.args.textfiles.replace(",", " ") if "mth" in vn.flags: j2a["def_hcols"] = vn.flags["mth"].split(",") - if self.args.js_browser: - j2a["js"] = self.args.js_browser - - if self.args.css_browser: - j2a["css"] = self.args.css_browser - html = self.j2s(tpl, **j2a) self.reply(html.encode("utf-8", "replace")) return True