mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
refactor: simplify variable assignment
This commit is contained in:
parent
c040deb0af
commit
bca0d7a001
1 changed files with 3 additions and 13 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue