summaryrefslogtreecommitdiff
path: root/ext/bg/js/anki-note-builder.js
Commit message (Collapse)AuthorAge
* Move bg/js (#1387)toasted-nutbread2021-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move bg/js/anki.js to js/comm/anki.js * Move bg/js/mecab.js to js/comm/mecab.js * Move bg/js/search-main.js to js/display/search-main.js * Move bg/js/template-patcher.js to js/templates/template-patcher.js * Move bg/js/template-renderer-frame-api.js to js/templates/template-renderer-frame-api.js * Move bg/js/template-renderer-frame-main.js to js/templates/template-renderer-frame-main.js * Move bg/js/template-renderer-proxy.js to js/templates/template-renderer-proxy.js * Move bg/js/template-renderer.js to js/templates/template-renderer.js * Move bg/js/media-utility.js to js/media/media-utility.js * Move bg/js/native-simple-dom-parser.js to js/dom/native-simple-dom-parser.js * Move bg/js/simple-dom-parser.js to js/dom/simple-dom-parser.js * Move bg/js/audio-downloader.js to js/media/audio-downloader.js * Move bg/js/deinflector.js to js/language/deinflector.js * Move bg/js/backend.js to js/background/backend.js * Move bg/js/translator.js to js/language/translator.js * Move bg/js/search-display-controller.js to js/display/search-display-controller.js * Move bg/js/request-builder.js to js/background/request-builder.js * Move bg/js/text-source-map.js to js/general/text-source-map.js * Move bg/js/clipboard-reader.js to js/comm/clipboard-reader.js * Move bg/js/clipboard-monitor.js to js/comm/clipboard-monitor.js * Move bg/js/query-parser.js to js/display/query-parser.js * Move bg/js/profile-conditions.js to js/background/profile-conditions.js * Move bg/js/dictionary-database.js to js/language/dictionary-database.js * Move bg/js/dictionary-importer.js to js/language/dictionary-importer.js * Move bg/js/anki-note-builder.js to js/data/anki-note-builder.js * Move bg/js/anki-note-data.js to js/data/anki-note-data.js * Move bg/js/database.js to js/data/database.js * Move bg/js/json-schema.js to js/data/json-schema.js * Move bg/js/options.js to js/data/options-util.js * Move bg/js/background-main.js to js/background/background-main.js * Move bg/js/permissions-util.js to js/data/permissions-util.js * Move bg/js/context-main.js to js/pages/action-popup-main.js * Move bg/js/generic-page-main.js to js/pages/generic-page-main.js * Move bg/js/info-main.js to js/pages/info-main.js * Move bg/js/permissions-main.js to js/pages/permissions-main.js * Move bg/js/welcome-main.js to js/pages/welcome-main.js
* Add note errors (#1329)toasted-nutbread2021-01-30
| | | | | | | | | | | | | | | | | | | * Update _addAnkiNote to track errors * Change comparison * Update anki note adding to show errors * Fix template * Show errors when Anki card creation behaves unexpectedly * Update some errors related to anki media injection * Update addAnkiNote error handling * Improve Anki errors * Simplify error messages related to template rendering
* Anki note data abstraction (#1228)toasted-nutbread2021-01-12
| | | | | | | | | | | | | | | | | | | | | | | * Create AnkiNoteData * Create AnkiNoteDataDefinitionProxyHandler * Update media injection * Create AnkiNoteDataDefinitionSecondaryProperties * Update note context format * Expose url and cloze on definition * Simplify for understandability * Remove unused _createNoteData * Update public object * Remove trims on sentence, since it should already be trimmed * Fix unused global
* Refactor anki note building (#1223)toasted-nutbread2021-01-10
| | | | | | | | | | | * Move TemplateRendererProxy creation into AnkiNoteBuilder * Simplify _stringReplaceAsync * Organize note generation * Rename API * Make the template rendering function more generic
* Refactor anki note generation (#1202)toasted-nutbread2021-01-03
| | | | | | | * Create _injectAnkiNoteMedia function * Remove unused code path * Simplify modeOptions
* Update copyright year (#1194)toasted-nutbread2021-01-01
| | | | | * Update copyright year * Remove redundant Author info
* Indicate if first Anki card field is invalid (#1145)toasted-nutbread2020-12-20
| | | | | * Add AnkiNoteBuilder.containsAnyMarker * Flag first field as invalid when there is no marker
* Frequencies marker (#1074)toasted-nutbread2020-11-28
| | | | | | | | | | | * Update japanese.js tests * Simplify fallback/early exit * Add overloads to furigana and furiganaPlain handlebars helper functions * Expose unique expression/reading arrays (and subsequently counts) * Add {frequencies} marker
* Popup style updates (#1066)toasted-nutbread2020-11-25
| | | | | | | | | | | * Replace compactGlossaries option with new glossaryLayoutMode option * Update attributes * Update attributes * Update color definitions * Fix default theme scrollbar
* Compact tags refactor (#1021)toasted-nutbread2020-11-12
| | | | | | | | | | | | | * Update translator to flag redundant tags instead of remove * Update how compact tags are shown in the popup * Pass compactTags option to note builder * Update options templates * Add options upgrade * Add options upgrade test
* Add duplicate check option (#1012)toasted-nutbread2020-11-08
| | | | | | | * Add anki.checkForDuplicates option * Use checkForDuplicates for button display * Add property to card creation
* Duplicate scope options (#955)toasted-nutbread2020-10-31
| | | | | * Add deck-root duplicate scope option * Implement support for deck-root scope
* Add clipboard-text Anki field (#863)toasted-nutbread2020-09-26
| | | | | | | * Add clipboard-text anki field * Add markers * Update clipboard injection
* Anki note media injection move (#801)toasted-nutbread2020-09-10
| | | | | | | * Move anki note media injection functionality into Backend * Add marker/mode checks * Remove media injection from AnkiNoteBuilder
* AudioUriBuilder simplification (#799)toasted-nutbread2020-09-10
| | | | | | | | | | | | | * Rename variables to disambiguate * Update handler argument convention * Update getUri argument convention * Change _getAudioUri argument convention * Change getDefinitionAudio argument convention * Add api.getDefinitionAudio definition
* Generalize AnkiNoteBuilder to not use audioSystem directly (#796)toasted-nutbread2020-09-09
|
* Anki media injection move (#793)toasted-nutbread2020-09-09
| | | | | | | | | | | | | | | * Update AnkiNoteBuilder to not store a reference to an AniConnect instance * Use more consistent details format * Organize options assignment * Move media injection * Inject images before injecting audio * Make functions private * Make static functions private
* Use common function for data URL mediatype/data extraction (#792)toasted-nutbread2020-09-09
|
* Anki screenshot refactor (#791)toasted-nutbread2020-09-09
| | | | | | | * Use more consistent style for injectScreenshot * Move screenshot generation into AnkiNoteBuilder/Backend * Get optionsContext before await
* Anki API refactor (#790)toasted-nutbread2020-09-09
| | | | | | | | | | | | | | | * Add function guiBrowseNote * Assign default server as null * Use get/set properties for server/enabled * Refactor option values * Refactor createNote/Data functions to not use options format directly * Use createNote for testing * Add errors
* Anki note clipboard marker (#780)toasted-nutbread2020-09-08
| | | | | | | | | | | * Update fields reference * Add support for adding clipboard images to anki notes * Add handlebars templates * Add markers * Add markers to readme
* Defer assignment of marker (#762)toasted-nutbread2020-09-04
|
* Pitch accent Anki field templates (#701)toasted-nutbread2020-08-01
| | | | | | | | | | | | | | | | | | | * Template helper updates * Add pitch data to exported field formatting data * Reuse note data * Add no-op * Set up pitch accent templates * Refactor version update functions * Implement upgrade process for new Anki templates * Consistency * Update README and anki.js to have matching markers
* Optimize anki note field generation (#611)toasted-nutbread2020-06-21
|
* Update background global object usage (#556)toasted-nutbread2020-05-24
| | | | | | | * Omit global window object for scripts used on the background page * Validate document exists before using * Remove dom.js from background.html
* Remove invalid file name characters from Anki media files (#496)toasted-nutbread2020-05-06
| | | | | * Replace invalid file name characters * Replace "filename" with "fileName"
* Anki audio download (#477)toasted-nutbread2020-05-02
| | | | | | | * Update how audio is added to Anki cards * Upgrade Anki templates * Update comments
* Add duplicateScope: 'deck' option (#476)toasted-nutbread2020-04-27
| | | | | | | | | * Add duplicateScope: 'deck' option * Add option to control duplicate scope * Use duplicateScope for findNoteIds * Update location of quotes
* Update the parameters passed to various audio-related functionstoasted-nutbread2020-04-18
|
* Pass anki reference to AnkiNoteBuilder constructortoasted-nutbread2020-04-12
|
* Update license author field to broader to explicitly reflect thatAlex Yatskov2020-04-10
| | | | | Yomichan is an ongoing community project. It really does take a village, and everyone who contributes code owns a part of it :)
* Fix field nametoasted-nutbread2020-04-07
|
* Pass AudioSystem instance to AnkiNoteBuilder constructortoasted-nutbread2020-04-07
|
* Remove inconsistent/unused return valuetoasted-nutbread2020-04-07
|
* Create _containsMarker to reduce redundant codetoasted-nutbread2020-04-07
|
* Move _dateToString into a new functiontoasted-nutbread2020-04-07
|
* Move media injection functions into AnkiNoteBuildertoasted-nutbread2020-04-07
|
* Add custom context object for note creationtoasted-nutbread2020-04-06
|
* Remove marker restrictionstoasted-nutbread2020-03-07
|
* Move stringReplaceAsynctoasted-nutbread2020-03-07
| | | | | It is only used in AnkiNoteBuilder and it was originally created for this purpose.
* Use dependency injection for apiTemplateRendertoasted-nutbread2020-03-07
|
* Move Anki note generation functionality into a new classtoasted-nutbread2020-03-07