"Close and lose current input ?" for sticky fields

AnkiWeb addon 1284221829

Warns before closing the Add Card window when a sticky field's content has changed, unless Anki 2.1.16 or later is used.
AI-generated summary; may contain mistakes.

card-creationbugfix-workaroundobsolete

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
4 (πŸ‘ 4 Β· πŸ‘Ž 0)
Updated
2019-10-15
Anki versions
<=2.1.15
License
GPL-3.0 (from the license file in the package)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, Batchfile
Description language
en

Maintenance

abandoned

  • Last update or commit: 2020-08-02 (2282 days before the snapshot).
  • Commits in the last year: 0.
  • Issues: 0 open, 1 closed.
  • Pull requests: 0 open, 1 merged.
  • Median first response: 488 hours (1 answered issues and pull requests).
  • Outside pull requests: 100% of 1 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.02.1.152019-10-15
History across monthly snapshots

Loading…

Similar addons

Customize Keyboard Shortcuts has 1 fork β†’

Customizes keyboard shortcuts on the main, editor, reviewer, and deck browser windows via the add-ons Config screen, supporting key sequences and duplicate shortcuts.

shortcuts

265 votes 75% approval πŸ‘ 212 Β· πŸ‘Ž 53 ⭐ 74 Anki 23.10~ Updated 2023-11-01
Better Editor

Adds editor shortcuts to clear all fields and their sticky settings (Ctrl+F9) and to toggle sticky status across all fields (Shift+F9).

note-managementshortcuts

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 Anki 2.1.55~ Updated 2022-12-31
Opening the same window multiple time

Allows most Anki windows, such as Add Cards and Browser, to be opened multiple times simultaneously, with configuration to keep selected windows single-instance.

card-creationsearchobsolete

111 votes 90% approval πŸ‘ 106 Β· πŸ‘Ž 5 ⭐ 10 Anki 2.1.26~ Updated 2023-11-05

Description

This addon has been incorporated in anki 2.1.16. It is thus disabled for version 2.1.16 and above. This add-on ensures that Anki warns you if you close the Add Card window even if you edited a sticky field (which Anki doesn't do by default).

README

"Close and lose current input ?" for sticky fields

This addon has been incorporated in anki 2.1.16. It is thus disabled for version 2.1.16 and above.

Rationale

If you try to close the "add card" window, and you have some content, anki warns you and check whether you really want to cloze the window.

Except that it does not takes into accont content in the sticky fields. Probably because, in this case, the content may comes from the last note, and it's not a problem if you lose it.

I want anki to takes sticky fields into account; if the content changed since the last note, then I want to be warned. Otherwise, no trouble, just close the window.

This is exactly what this add-on does; it warns if there is changed content if the sticky field.

Warning

This add-on is incompatible with add-on 46741504: Allows empty first field during adding and import.

Internal

This add-on change the methods:

  • aqt.addacrds.AddCards.__init__ and calls the previous method
  • aqt.addacrds.AddCards.addNote and calls the previous method
  • aqt.addacrds.AddCards.ifCanClose
  • aqt.editor.Editor.fieldsAreBlank

Version 2.0

None

TODO

Create an add-on mixing this one and 46741504

Links, licence and credits

Key Value
Copyright Arthur Milchior arthur@milchior.fr
Based on Anki code by Damien Elmes anki@ichi2.net
License GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
Source in https://github.com/Arthur-Milchior/anki-Close-and-lose-current-input-for-sticky-fields
Addon number 1284221829