aboutsummaryrefslogtreecommitdiff
path: root/ext/js/language
Commit message (Collapse)AuthorAge
* Add support for alt attribute on structured content images (#359)Stephen Kraus2023-12-23
| | | | | | | | | | | * Add support for alt attribute on structured content images * Add new `alt` property for structured content images * Update test script with new media file count --------- Co-authored-by: stephenmk <stephenmk@users.noreply.github.com>
* Minor optimizations for dictionary import (#412)Cashew2023-12-21
| | | | | | | * minor dictionary import optimizations * fix comment * use regex for matching
* rename variables (#409)Cashew2023-12-20
| | | | | | | | | | | * rename variables * add comment to ambiguous variable * rename variables * add comments * rename functions
* rename variables (#404)Cashew2023-12-20
|
* fix typo (#405)Cashew2023-12-20
|
* Declare static fields using modern JavaScript syntax (#400)toasted-nutbread2023-12-20
|
* Template type improvements (#380)toasted-nutbread2023-12-19
| | | | | | | * Default templates to unknown * Default typescript templates to unknown * More template type updates
* Make JSON.parse usage safer (#373)toasted-nutbread2023-12-19
| | | | | | | | | | | | | | | * Make JSON.parse usage safer * Fix any type * Add readResponseJson * Use readResponseJson * Additional updates * Rename files * Add types
* update JSDoc comments (#387)Cashew2023-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lesen-tan initial commit * update README.md * tidy up code * opt for Map<K, V> instead of Object * Document dev/* * add docs for deinflector.js * update deinflector example * Annotate * Revert "Merge branch 'development' of https://github.com/Scrub1492/lesen-tan into development" This reverts commit b92348f702bc031b36f24462adfa940d17f9ecdd, reversing changes made to 3255e6d963281af3533dcf1e893df39032d29fec. * Lint error fix * Lint error fix * update JSDoc comments --------- Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
* IIFE updates (#384)toasted-nutbread2023-12-19
| | | | | | | * Remove most IIFEs * Move IIFEs into functions * Don't await background-main
* Add some JSDoc annotations to describe code functionality. (#355)Cashew2023-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | * lesen-tan initial commit * update README.md * tidy up code * opt for Map<K, V> instead of Object * Document dev/* * add docs for deinflector.js * update deinflector example * Annotate * Revert "Merge branch 'development' of https://github.com/Scrub1492/lesen-tan into development" This reverts commit b92348f702bc031b36f24462adfa940d17f9ecdd, reversing changes made to 3255e6d963281af3533dcf1e893df39032d29fec. * Lint error fix * Lint error fix
* Fix Non JP Scanning Option for Kanji Dictionaries (#372)marv2023-12-18
| | | | | | | * Fix non JP scanning option for kanji dictionaries * Fix trailing comma * Add removeNonJapaneseCharacters to test inputs
* Mock updates (#370)toasted-nutbread2023-12-18
| | | | | | | | | * Move DictionaryImporterMediaLoader mock * Move TemplateRendererProxy mock * Simplify mock * Remove ignore rule because it seems unused
* Update eslint spacing rules (#366)toasted-nutbread2023-12-17
| | | | | | | | | * Add space-infix-ops rule * Add no-multi-spaces --------- Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
* Fix usage of any (*) type in DocumentUtil (#361)toasted-nutbread2023-12-16
|
* Fix some import orderingstoasted-nutbread2023-12-03
|
* Update library typestoasted-nutbread2023-11-27
|
* Revert "Use import map"toasted-nutbread2023-11-27
|
* Update timer types and suchtoasted-nutbread2023-11-27
|
* Use import maptoasted-nutbread2023-11-27
|
* Update offscreentoasted-nutbread2023-11-27
|
* Update dictionary importertoasted-nutbread2023-11-27
|
* Update typestoasted-nutbread2023-11-27
|
* Add extension error importstoasted-nutbread2023-11-27
|
* Remove unneeded referencestoasted-nutbread2023-11-27
|
* Add JSDoc type annotations to project (rebased)toasted-nutbread2023-11-27
|
* `yomichan` -> `yomitan`starxeras2023-11-10
|
* Switch to vitest for ESM support; other fixesDarius Jahandarie2023-11-08
|
* Modernize codebaseDarius Jahandarie2023-11-04
| | | | | | - Use ES modules - Remove vendored libs and build them from npm using esbuild - Switch from JSZip to zip.js
* Replace JsonSchema with ajv for dictionary validationDarius Jahandarie2023-11-03
|
* add sort dictionary data to parse results on the search pagepraschke2023-10-13
| | | | this is based on forsakeninfinity's commit https://github.com/forsakeninfinity/yomibaba/commit/c9887d51ed5c917bb900d7964614154de1d76872
* fix: window.getSelection() can return null on Firefoxpraschke2023-08-17
|
* fixed eslint, changed header to only use 2 spaces, added missing headers to testAustin Siew2023-03-22
|
* Updated LICENSE to full license, added Yomitan 2023 to all license headersAustin Siew2023-03-21
|
* Fix text selection not always working properly (#2246)toasted-nutbread2022-10-15
|
* TextSource* API updates (#2236)toasted-nutbread2022-09-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move TextSourceRange static functions to DocumentUtil getWritingMode is also simplified * Update Google Docs range to be empty to match other range sources * Rename imposterContainer to imposterElement * Add static creation functions * Add static creation function * Remove unused collapse function * Don't select imposter elements * Refactor setEndOffset * Adjust argument order for setEndOffset * Update TextSourceRange constructor * Remove unused isConnected * Cache rects * Fix test * Remove unused getRect * Revert "Fix test" * Remove cachedRect * Use the source element rect to handle scroll differences * Writing mode update * Remove _cachedRects update This shouldn't be necessary as the imposter is usually detached almost immediately after scanning, giving no time for the window to be resized or scrolled.
* DocumentUtil static (#2232)toasted-nutbread2022-09-24
| | | | | | | | | | | | | | | * Make all methods static The two non-static methods are kept for temporary compatibility * Use this instead of class name now that functions are static * Update test * Don't instantiate DocumentUtil * Remove temporary non-static methods * Remove unused global declaration
* Exclude documentElement from zoom calculation (#2227)toasted-nutbread2022-09-20
| | | | | | | | | | | | | | | * Exclude documentElement from zoom calculation * Add an option * Refactor zoom coordinate conversion functions * Convert zoom coordinates for text sources * Rename variable * Convert rect coordinate spaces * Handle shadow DOM
* Fix setEndOffset (#2214)toasted-nutbread2022-08-20
| | | | | * Add _layoutAwareScan option to TextSourceElement.setEndOffset for parity * Remove default param
* Do not change selection if user selected text manually (#2186)oakkitten2022-07-01
| | | | | | | | | | | | | | * Do not change selection if user selected text manually * Remove capture argument for selectionchange listener It is not applicable * Make a note of user selection when Yomichan is enabled User might have some text selected on a page prior to enabling Yomichan via the toolbar icon; let it stay intact. * Extract selection change by user listener into a method
* TextScanner refactor (#2174)toasted-nutbread2022-06-05
| | | | | * Refactor input conversion, add additional validation * Simplify input data structure
* Touch and pen input updates (#2172)toasted-nutbread2022-06-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove unnecessary return * Move touch start input filtering * Refactor * Add scanOnTouchPress * Add preventPenScrolling * Rename scanOnPenPress to scanOnPenMove * Rename scanOnPenRelease to scanOnPenReleaseHover * Simplify * Refactor _searchAtFromPen early exit * Merge _penPointerPressed and _penPointerReleased into a single variable * Add more options * Simplify pen pointer coordinates * Implement scanOnPenPress and scanOnPenRelease * Implement scanOnTouchRelease * Fix tests * Don't search on touch cancel * Cancel touch if the touch action is used for scrolling or other gestures * Fix incorrect scroll prevention options being used * Organize options * Fix typos
* Sort using number of definitions (#2166)toasted-nutbread2022-05-29
|
* Sort using frequency dictionary before using dictionary priority (#2165)toasted-nutbread2022-05-29
|
* ESlint JSdoc (#2148)toasted-nutbread2022-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Install eslint-plugin-jsdoc * Initial rules setup * Update lists * Use @returns rather than @return * Remove error throwing code which is never executed * Fix issues relating to @throws * General error fixes * Update Display type documentation * Various doc fixes * Fix invalid tuple syntax * Doc updates * Remove unused * Doc updates * Enable jsdoc/require-returns * Update rules * Update remaining rules
* Add mode documentation about the types used by Translator (#2147)toasted-nutbread2022-05-19
|
* Text scanner event capture (#2101)toasted-nutbread2022-04-02
| | | | | * Add capture parameter to event listeners * Enable capture
* Update copyright date (#2062)toasted-nutbread2022-02-02
| | | | | | | * Update eslint settings * Update 2021 files * Update other files
* Scanning wildcards (#2042)toasted-nutbread2021-12-18
| | | | | | | | | * Add scanning.matchTypePrefix option * Update TextScanner to use matchTypePrefix option * Add setting * Update warning
* matchType/deinflect distinction (#2040)toasted-nutbread2021-12-17
| | | | | | | * Pass a "deinflect" option to findTerms * Update Translator to use deinflect option * Fix test input options