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:
|
else:
|
||||||
label_element = ""
|
label_element = ""
|
||||||
|
|
||||||
if id:
|
idstr = f"id={id}" if id else ""
|
||||||
idstr = f"id={id}"
|
toggleScript = "toggleEditorButton(this);" if toggleable else ""
|
||||||
else:
|
|
||||||
idstr = ""
|
|
||||||
|
|
||||||
if toggleable:
|
|
||||||
toggleScript = "toggleEditorButton(this);"
|
|
||||||
else:
|
|
||||||
toggleScript = ""
|
|
||||||
|
|
||||||
tip = shortcut(tip)
|
tip = shortcut(tip)
|
||||||
|
|
||||||
if rightside:
|
class_ = "linkb" if rightside else "rounded"
|
||||||
class_ = "linkb"
|
|
||||||
else:
|
|
||||||
class_ = "rounded"
|
|
||||||
|
|
||||||
if not disables:
|
if not disables:
|
||||||
class_ += " perm"
|
class_ += " perm"
|
||||||
|
|
Loading…
Reference in a new issue