diff --git a/qt/aqt/editor.py b/qt/aqt/editor.py index 437fadc66..65f87c26c 100644 --- a/qt/aqt/editor.py +++ b/qt/aqt/editor.py @@ -311,22 +311,12 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too else: label_element = "" - if id: - idstr = f"id={id}" - else: - idstr = "" - - if toggleable: - toggleScript = "toggleEditorButton(this);" - else: - toggleScript = "" + idstr = f"id={id}" if id else "" + toggleScript = "toggleEditorButton(this);" if toggleable else "" tip = shortcut(tip) - if rightside: - class_ = "linkb" - else: - class_ = "rounded" + class_ = "linkb" if rightside else "rounded" if not disables: class_ += " perm"