diff --git a/copyparty/__main__.py b/copyparty/__main__.py index ccda07f6..bc847738 100644 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -1796,6 +1796,7 @@ def add_ui(ap, retry: int): ap2.add_argument("--ufavico", metavar="TXT", type=u, default="", help="URL to .ico/png/gif/svg file; \033[33m--favico\033[0m takes precedence unless disabled (volflag=ufavico)") ap2.add_argument("--ext-th", metavar="E=VP", type=u, action="append", help="\033[34mREPEATABLE:\033[0m use thumbnail-image \033[33mVP\033[0m for file-extension \033[33mE\033[0m, example: [\033[32mexe=/.res/exe.png\033[0m] (volflag=ext_th)") ap2.add_argument("--mpmc", type=u, default="", help=argparse.SUPPRESS) + ap2.add_argument("--notooltips", action="store_true", help="tooltips disabled as default") ap2.add_argument("--spinner", metavar="TXT", type=u, default="🌲", help="\033[33memoji\033[0m or \033[33memoji,css\033[0m Example: [\033[32m🥖,padding:0\033[0m]") ap2.add_argument("--css-browser", metavar="L", type=u, default="", help="URL to additional CSS to include in the filebrowser html") ap2.add_argument("--js-browser", metavar="L", type=u, default="", help="URL to additional JS to include in the filebrowser html") diff --git a/copyparty/authsrv.py b/copyparty/authsrv.py index 041d3324..78e8610e 100644 --- a/copyparty/authsrv.py +++ b/copyparty/authsrv.py @@ -393,7 +393,6 @@ class VFS(object): axs: AXS, flags: dict[str, Any], ) -> None: - nss: set[str] = set() self.log = log self.realpath = realpath # absolute path on host filesystem self.vpath = vpath # absolute path in the virtual filesystem @@ -3096,6 +3095,10 @@ class AuthSrv(object): for zs in zs.split(): if vf.get(zs): js_htm[zs] = 1 + zs = "notooltips" + for zs in zs.split(): + if getattr(self.args, zs, False): + js_htm[zs] = 1 vn.js_htm = json_hesc(json.dumps(js_htm)) vols = list(vfs.all_nodes.values()) diff --git a/copyparty/web/util.js b/copyparty/web/util.js index 9a97b32a..a63f25b1 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -1487,7 +1487,7 @@ var tt = (function () { var r = { "tt": mknod("div", 'tt'), "th": mknod("div", 'tth'), - "en": true, + "en": !window.notooltips, "el": null, "skip": false, "lvis": 0