aboutsummaryrefslogtreecommitdiff
path: root/ext/js
Commit message (Collapse)AuthorAge
* Object utilities (#729)toasted-nutbread2024-02-27
| | | | | | | | | | | | | | | | | | | | | * Create utilities * Rename old isObject * Use new isObject * Remove old function * Add additional function * Simplify for now * Rename function for clarity * Rename function * Expand type * Update eslint
* Remove redundant escaping (#722)Kuuuube2024-02-27
|
* make deinflections language-specific (#720)StefanVukovic992024-02-27
| | | | | | | | | | | | | * abstract deinflections * undo redundant changes * remove cast * MultiLanguageTransformer * comments * comments
* "isJapanese" check move (#730)toasted-nutbread2024-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move isStringPartiallyJapanese out of ClipboardMonitor * Create isStringPartiallyJapanese function * Add textMayBeTranslatable * Rename API function * Rename internal function * Add helper * Update translatable check * Pass language to TextScanner * Pass language explicitly * Use textMayBeTranslatable * No redundant translatable check * Update eslint * Remove double newline * Collapse * Rename
* Turn on @typescript-eslint/no-unsafe-argument (#728)24.2.26.0toasted-nutbread2024-02-25
|
* Fix anki template field marker menu (#725)toasted-nutbread2024-02-25
| | | | | | | | | * Fix HTML collection * Expose templates * Fix menu setup * Warn
* fix translator bug, simplify language-transformer (#687)24.2.23.0StefanVukovic992024-02-23
| | | | | | | | | | | | | | | * simplify transformer * use isPartOfSpeech * simplify * rename to isDictionaryForm * NOP --------- Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
* add more languages (#684)StefanVukovic992024-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions * part1 * frotend done? * fix tests * offscreen and type complications * add tests * start fixing tests * keep fixing tests * fix tests * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions * delete pt * renames * add tests * kebab-case filenames * lint * minor fixes * merge * fixes * fix part of comments * fix more comments * delete unused types * comment * comment * do backend * other files * move fetch utils to own file * remove extra line * add extra line * remove unnecessary export * simplify folder structure * remove redundant async * fix param type in api * fix language index * undo changes to cssStyleApplier * undo changes to utilities.js * undo changes to utilities.js * simplify language util * lint * undo phantom changes to anki integration * require textTransformations options * explicit locale in localeCompare * punctuate notes * prefer early exit * rename LanguageOptionsObjectMap * rename to textPreprocessor * tuple with names instead of boolean array * safe data setting * optional chaining * simplify LanguageOptions * encapsulate languages * delete language util * nullable language in text preprocessors controller * rename transform to process * remove settings * make translation advanced again * remove unused getTextTransformations api call * comments * change language types * RIP flags * comments * fix tests * lint * Text preprocessor type changes (#10) * Add types * Update types * Simplify type check * Refactor typing and structuring of language definitions * lint * update translator benchmark * undo markdown changes * undo markdown changes * undo markdown changes * more merge * add more languages * wip * refactoring * fixes * add comment, delete settings text * remove language from jsconfig --------- Co-authored-by: toasted-nutbread <toasted-nutbread@users.noreply.github.com> Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
* Constructor simplification (#713)toasted-nutbread2024-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update AudioDownloader * Update Translator * Update ClipboardMonitor * Update ClipboardReader * Update PanelElement * Update QueryParser * Update DisplayGenerator * Update DisplayHistory * Update DOMDataBinder * Remove unnecessary cast * Update Popup types * One declaration per line * Remove optionals from Frontend constructor * Fix Translator constructor
* Popup preview frame API map (#712)toasted-nutbread2024-02-20
| | | | | | | | | * Add API map type safety * Add API map types * Simplify names * Remove unused type
* Update eslint rules (#710)toasted-nutbread2024-02-19
|
* Application main updates (#708)toasted-nutbread2024-02-18
| | | | | | | * Move waitForBackendReady * Add option to wait for DOM before running main * Move script load to be earlier
* Refactor DocumentUtil (#706)toasted-nutbread2024-02-18
| | | | | * Refactor DocumentUtil * Isolate suppression
* Html templates update (#707)toasted-nutbread2024-02-18
| | | | | | | | | | | | | | | | | | | | | * Simplify display template loading * Add helper * Rename file * Rename for simplicity * Create templates file * Load * Remove templates * Move permissions templates * Remove "templates" from comments * Fix prepare
* Language descriptors organization (#704)toasted-nutbread2024-02-18
| | | | | | | | | | | | | | | | | | | | | * Move languageDescriptorMap * Move text preprocessors * Merge into language-descriptors.js * Merge typescript * Initialize inline * Move types * Update types * Update eslint * Update jsconfig reference * Rename
* disable kana conversion on search page for other languages (#705)StefanVukovic992024-02-18
| | | | | | | * disable kana conversion for other languages * ternary parentheses * css fix
* Log update (#701)toasted-nutbread2024-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't export Logger * Rename logger.js to log.js * Move helper function * Update extension name configuration * Simplify docs * Move issue URL to a field * Simplify context * Remove optional params that are never used * Configure backend * Update eslint * Simplify * Rename function * Simplify _api reference * Simplify docs * Remove unused log levels (except 'log') * Add log function * Rename for more clear intent * Use log.log
* switch preview popup's example text based on language (#700)StefanVukovic992024-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions * part1 * frotend done? * fix tests * offscreen and type complications * add tests * start fixing tests * keep fixing tests * fix tests * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions * delete pt * renames * add tests * kebab-case filenames * lint * minor fixes * merge * fixes * fix part of comments * fix more comments * delete unused types * comment * comment * do backend * other files * move fetch utils to own file * remove extra line * add extra line * remove unnecessary export * simplify folder structure * remove redundant async * fix param type in api * fix language index * undo changes to cssStyleApplier * undo changes to utilities.js * undo changes to utilities.js * simplify language util * lint * undo phantom changes to anki integration * require textTransformations options * explicit locale in localeCompare * punctuate notes * prefer early exit * rename LanguageOptionsObjectMap * rename to textPreprocessor * tuple with names instead of boolean array * safe data setting * optional chaining * simplify LanguageOptions * encapsulate languages * delete language util * nullable language in text preprocessors controller * rename transform to process * remove settings * make translation advanced again * remove unused getTextTransformations api call * comments * change language types * RIP flags * comments * fix tests * lint * Text preprocessor type changes (#10) * Add types * Update types * Simplify type check * Refactor typing and structuring of language definitions * lint * update translator benchmark * undo markdown changes * undo markdown changes * undo markdown changes * more merge * use example text * comments * comments --------- Co-authored-by: toasted-nutbread <toasted-nutbread@users.noreply.github.com> Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
* Application data refactor (#699)toasted-nutbread2024-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Pass tabId and frameId to Application * Remove casts * Remove redundant frameInformationGet calls * Expose tabId and frameId * Remove unsed * Simplify * Update FrameAncestryHandler to not need a direct frameId * Remove frameId from FrameOffsetForwarder * Remove frameId from PopupFactory * Remove frameId from Frontend * Remove frameId from PopupPreviewFrame * Fix PopupFactory and Frontend constructor * Remove frameId from Display * Remove frameId from SearchDisplayController * Restore if check
* add language select, abstract text transformations (#584)StefanVukovic992024-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions * part1 * frotend done? * fix tests * offscreen and type complications * add tests * start fixing tests * keep fixing tests * fix tests * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions * delete pt * renames * add tests * kebab-case filenames * lint * minor fixes * merge * fixes * fix part of comments * fix more comments * delete unused types * comment * comment * do backend * other files * move fetch utils to own file * remove extra line * add extra line * remove unnecessary export * simplify folder structure * remove redundant async * fix param type in api * fix language index * undo changes to cssStyleApplier * undo changes to utilities.js * undo changes to utilities.js * simplify language util * lint * undo phantom changes to anki integration * require textTransformations options * explicit locale in localeCompare * punctuate notes * prefer early exit * rename LanguageOptionsObjectMap * rename to textPreprocessor * tuple with names instead of boolean array * safe data setting * optional chaining * simplify LanguageOptions * encapsulate languages * delete language util * nullable language in text preprocessors controller * rename transform to process * remove settings * make translation advanced again * remove unused getTextTransformations api call * comments * change language types * RIP flags * comments * fix tests * lint * Text preprocessor type changes (#10) * Add types * Update types * Simplify type check * Refactor typing and structuring of language definitions * lint * update translator benchmark * undo markdown changes * undo markdown changes * undo markdown changes * more merge * simplify language controller --------- Co-authored-by: toasted-nutbread <toasted-nutbread@users.noreply.github.com> Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
* Even more eslint rules (#696)toasted-nutbread2024-02-17
| | | | | | | | | * capitalized-comments * Turn rules on * Add miscellaneous rules * More rules
* Document OffscreenProxy (#675)toasted-nutbread2024-02-15
|
* Eslint rule updates (#673)toasted-nutbread2024-02-15
| | | | | | | | | | | | | | | | | * Install unicorn * Add rules * Fix issues * Install sonarjs * Set up rules * Fix issues * Install eslint-plugin-import and fix import extensions * Simplify permitted error names
* Show all duplicate notes on click (#636)Eloy Robillard2024-02-15
| | | | | | | | | | | | | | | | | * Show all duplicate notes on click * Change 'notesView' to 'viewNotes' * Replace api.noteView with api.viewNotes * Update "viewNote" action to "viewNotes" in options util * Update options-util test with "viewNotes" action * Replace uses of "viewNote" with "viewNotes" * Replace _viewNote with _viewNotes * Rename /*ViewNote*/ methods to /*ViewNotes*/
* Add and fix tests with options upgrades (#671)24.2.12.0Kuuuube2024-02-12
| | | | | | | | | | | | | | | | | | | | | | | * Add and fix tests and options applying * Fix comma * Add test file to json.json * Fix direction of conjugation handlebars update * Add frequency and cloze-body-kana to upgrade * Use Array.isArray() instead of arbitrary length check * Add pitch-accent-categories handlebar * programmatically get upgrade files * add type --------- Co-authored-by: Cashew <tungbinem@gmail.com>
* Move isExtensionUrl into WebExtension (#666)toasted-nutbread2024-02-11
|
* Eslint rule updates (#665)toasted-nutbread2024-02-11
| | | | | | | | | | | | | | | | | | | | | | | * Padding newline rules * Update rules * Update rules * Update rules * Updates * Update object quotes * Merge similar ts and js rules * Change export spacing rules * Move typescript-eslint rules * Spacing * Actually save and commit changes
* Add eslint eol-last rule (#662)Cashew2024-02-10
| | | | | | | * add eol-last eslint rule * fix lint * update css-json.test
* Search Page Profile Switching (#648)marv2024-02-08
| | | | | | | | | | | | | * Add profile select dropdown * Remove right align on profile switcher in search * Fix API access * Don't cache optionsFull --------- Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
* Fix hotkey helper not properly returning attributesArray (#651)toasted-nutbread2024-02-08
|
* Add cloze-body-kana handlebar (#650)Kuuuube2024-02-08
| | | | | * Add cloze-body-kana handlebar * Convert if else to ternary
* Update eslint (#638)toasted-nutbread2024-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add json test * Update vscode settings to better handle json * Collapse eslint rules for easier readability * Reorganize * Update no-multi-spaces rule for JSON * Rules updates * Switch to @stylistic/eslint-plugin * Update deprecated stylistic rules * Group stylistic rules * Simplify rules * Move eslint env overrides to end of file * Add test * Move promiseAnimationFrame to separate file * Remove unneeded eslint disable * Remove unneeded
* Transformation performance optimizations (#645)Cashew2024-02-07
| | | | | | | | | | | | | | | | | | | | | | * perform transformation bounds * fix wrong continue * fix wrong undefined check * regex performance * suffixHeuristic * escape RegExp * fix escapeRegExp * move destructuring after suffixHeuristic check --------- Co-authored-by: Stefan Vukovic <stefanvukovic44@gmail.com> Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
* Update application init process (#634)toasted-nutbread2024-02-07
|
* ignore soft hyphen when scanning text (#640)StefanVukovic992024-02-05
| | | | | * add soft hyphen to ignored characters * add soft hyphen to ignored characters
* Reduce repeated anki field marker code (#632)toasted-nutbread2024-02-05
| | | | | | | | | | | * Unify repeated code for getting anki field markers * Throw because type safety exists * Simplify * Update order * Update test data
* move files (#630)StefanVukovic992024-02-04
|
* Extract fetch functions to utilities (#629)StefanVukovic992024-02-04
| | | | | | | | | | | | | | | * do backend * other files * move fetch utils to own file * remove extra line * add extra line * remove unnecessary export * undo changes to cssStyleApplier
* Chrome types update (#614)toasted-nutbread2024-02-03
| | | | | | | * Update chrome types * Fix issues * Update manifest author
* Text source generator function move (#611)toasted-nutbread2024-02-03
| | | | | | | * Move functionality into TextSourceGenerator * Move extractSentence * Move isWhitespace
* Add frequency number handlebars (#600)Kuuuube2024-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add frequencies-num handlebar * Fix handlebar name * Fix inconsistent variable name format * Add frequency-number to anki tests * Use full names for total and frequency variables * Migrate handlebars to JS, split rank and occurance, add average * Remove left behind frequency-number * Fix "occurrence" spelling * Cleanup types * Add frequency support for kanji cards * Fix code style * Clean up most of duplicate code and merge functions * Fix frequencies.length check * Use less witchcraft and remove redundant type casting
* Fix auto hide search popup (#592)toasted-nutbread2024-02-03
| | | | | | | | | | | * Remove return * Update searched event * Fix auto-hide search popup event not occuring * Add TODO * Split into multiple events
* Application refactor (#591)toasted-nutbread2024-02-01
| | | | | | | | | | | * Rename Yomitan class to Application, change initialization style * Rename file * Update init * Update config * Remove dead code
* Document util + google docs util state refactor (#590)toasted-nutbread2024-01-31
| | | | | | | | | * Remove static from GoogleDocsUtil since it has state * Create TextSourceGenerator * Remove DocumentUtil custom registrations * Use TextSourceGenerator
* Module refactoring (#588)toasted-nutbread2024-01-31
| | | | | | | | | | | | | | | | | | | | | * Convert PronunciationGenerator into static functions * Convert DictionaryDataUtil into static functions * Convert AnkiNoteDataCreator into static functions * Convert MediaUtil into static functions * Convert RegexUtil into static functions * Convert StringUtil into static functions * Convert ArrayBufferUtil into static functions * Convert AnkiUtil into static functions * Convert PermissionsUtil into static functions * Convert ProfileConditionsUtil into static functions
* Language transformer (#582)toasted-nutbread2024-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Set up new deinflection data file * Define types * Test * Add internal types * Set up loading for transforms * Add getPartOfSpeechFlags * Convert static methods * Add note * Add transform function * Update trace structure * Add a language tag to the language transform descriptor * Add clear function * Add function for multiple parts of speech * Clarify naming * Add getConditionFlagsFromConditionType * Add plural function * Replace usages of Deinflector * Update tests * Update config * Remove old * Rename * Rename files
* Allow `clip-path`, `background`, `text-emphasis` styles in structured ↵Stephen Kraus2024-01-31
| | | | | | | | | | | content (#556) * Allow `clip-path` and `background` styles in structured content * Allow `text-emphasis` style in structured content --------- Co-authored-by: stephenmk <stephenmk@users.noreply.github.com>
* Fix chrome.runtime.lastError not working properly on Firefox (#593)toasted-nutbread2024-01-31
|
* JapaneseUtil refactor (#555)toasted-nutbread2024-01-28
| | | | | | | * Copy functions from JapaneseUtil * Remove JapaneseUtil * Update usages of JapaneseUtil functions
* Adding a handlebar to return pitch accent categories of a word (#563)arbyste2024-01-27
| | | | | * Fixing logic in isNonNounVerbOrAdjective function * Adding handlebar to return pitch accent categories of a word