yomichan/ext/bg/js
toasted-nutbread 86c64ac4c2
Translator refactoring (#878)
* Add helper function _getSecondarySearchDictionaryMap

* Use spreads instead of concat

* Create helper function for assigning disambiguation info

* Add _getTermTagsScoreSum helper

* Rename variables

* Move assignment of definition details

* Convert databaseDefinitions to standard definitions

* Move creation of definitions

* Always pass definitionsByGlossary directly to _mergeByGlossary

* Refactor how used definitions are tracked

* Change _mergeByGlossary parameters

* Simplify _mergeByGlossary

* Generate definition structure at the end of the function

* Add reusable function to clone a tag

* Restructure merged sub-definition creation

* Move setup of totalExpressionSet/totalReadingSet

* Track all definitions with matching glossary

* Move creation of definitionTags

* Update score calculation for multiple definitions

* Disambiguate function name

* Rename variables

* Add helper function _createMergedGlossaryTermDefinition

* Remove rarely used check for secondary search results

Unclear what the purpose was since it was almost never used

* Update data structure

* Rename function/variable

* Add helper functions _createMergedTermDefinition

* Assign expressionDetails to variable

* Add rawSource to grouped definitions

* Use shared function for creating unused definition entries

* Add helper function _createMapKey

* Refactor _createExpressionDetails

* Change argument order

* Add _getTagNamesWithCategory helper

* Optimize _compressDefinitionTags

* Add _createGroupedTermDefinition helper

* Add type information

* Use consistent order for term definition fields, add comments for omitted fields

* Remove unused index field

* Add helper function _createKanjiDefinition

* Update types

* Add frequencies/pitches arrays

* Update terms array setup

* Simplify for loop

* Remove redundant property assignment

* Simplify how deinflections with no definitions are ignored

* Ensure duplicates are removed

* Rename variable

* Add comments about duplicate data

* Refactor variable/parameter names

* Move functions

* Rename functions

* Rename variable

* Add dictionaryPriority field

* Simplify priority comparison

* Rename argument

* Optimize comparison function when dictionary priority is not needed

* Add length check

* Remove unused parameter

* Rename variables/parameters

* Rename dictionaries to enabledDictionaryMap

* Store compactTags/mainDictionary options to variables

* Refactor _getSearchableText
2020-10-04 11:12:15 -04:00
..
settings Move searchTerms/searchKanji to front of object definitions (#873) 2020-09-27 11:53:07 -04:00
anki-note-builder.js Add clipboard-text Anki field (#863) 2020-09-26 13:45:48 -04:00
anki.js Anki API refactor (#790) 2020-09-09 11:54:40 -04:00
audio-downloader.js Audio system refactor (#858) 2020-09-26 13:41:26 -04:00
backend.js Send message updates (#864) 2020-09-26 13:47:09 -04:00
background-main.js Cleanup unused utils (#832) 2020-09-15 19:48:58 -04:00
clipboard-monitor.js ClipboardReader class (#854) 2020-09-20 15:10:57 -04:00
clipboard-reader.js Media utility refactor (#859) 2020-09-26 13:42:31 -04:00
context-main.js Merge redundant toggle handling code (#693) 2020-07-26 16:53:24 -04:00
database.js Rename GenericDatabase to Database (#634) 2020-06-28 17:29:16 -04:00
deinflector.js Dictionary data structure improvements (#877) 2020-10-02 17:59:14 -04:00
dictionary-database.js Settings dictionary import refactor (#759) 2020-09-04 17:54:34 -04:00
dictionary-importer.js Media utility refactor (#859) 2020-09-26 13:42:31 -04:00
json-schema.js Cache map improvements (#856) 2020-09-22 20:09:12 -04:00
mecab.js Error logging refactoring (#454) 2020-04-26 16:55:25 -04:00
media-utility.js Media utility refactor (#859) 2020-09-26 13:42:31 -04:00
options.js Move searchTerms/searchKanji to front of object definitions (#873) 2020-09-27 11:53:07 -04:00
profile-conditions.js Profile conditions cleanup (#768) 2020-09-04 17:53:29 -04:00
query-parser-generator.js Query parser refactor (#683) 2020-07-24 16:03:11 -04:00
query-parser.js Text scanner fixes and refactoring (#788) 2020-09-08 19:23:32 -04:00
request-builder.js Make fetchModifyHeaders private (#767) 2020-09-04 18:00:22 -04:00
search-main.js Script ready state change (#672) 2020-07-18 17:11:38 -04:00
search.js Fix page type never being detected as search page correctly (#867) 2020-09-26 18:47:58 -04:00
simple-dom-parser.js Create abstraction class for parsing DOM (#798) 2020-09-10 11:30:01 -04:00
template-renderer-frame-api.js Fix typeof comparing against a string (#849) 2020-09-19 22:19:31 -04:00
template-renderer-frame-main.js Handlebars sandbox (#612) 2020-09-18 21:16:39 -04:00
template-renderer-proxy.js Remove border/margin/padding/pointerEvents from iframe (#841) 2020-09-19 17:13:34 -04:00
template-renderer.js Fix template renderer sandbox compatibility (#770) 2020-09-04 18:19:43 -04:00
text-source-map.js Refactor text source map (#649) 2020-07-03 15:57:17 -04:00
translator.js Translator refactoring (#878) 2020-10-04 11:12:15 -04:00