aboutsummaryrefslogtreecommitdiff
path: root/ext/js
Commit message (Collapse)AuthorAge
* 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
|
* DOMTextScanner updates (#2146)toasted-nutbread2022-05-18
| | | | | | | | | | | * JSDoc updates * Move function * Simplify * Refactor return type * Refactor getElementSeekInfo return type
* CssStyleApplier updates (#2145)toasted-nutbread2022-05-18
| | | | | | | | | * Update internal structure of _styleData * Rename parameter * Rename * Add docs
* Fix this._horizontalTextPositionBelow being assigned incorrectly (#2144)toasted-nutbread2022-05-18
|
* Update _getNodeNoteIds to return integer IDs (#2142)toasted-nutbread2022-05-16
|
* Popup positioning improvements (#2135)toasted-nutbread2022-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rename elementRect to sourceRect * Add getRects function to TextSourceElement and TextSourceRange * Add jsdocs * Remove unnecessary valid parameter * Remove default parameter * Make optionsContext optional * Remove unnecessary checks * Update sourceRect to use left/right rather than x/y * Update the return type of Popup*.getFrameRect * Rename some unrelated rect vars for disambiguation * Disambiguate between Popup.Rect and Popup.ValidRect * Move sourceRect destructuring * Pass multiple source rects * Simplify * Change Rect to use right/bottom rather than width/height * Update how popup offset is applied * Simplify frame offset * Remove _applyFrameOffset * Use right/bottom rather than width/height * Simplify some positioning settings * Update parameter names for clarity * Fix typos * Refactor data type for _getPosition* functions * Support using multiple source rects * Combine _getPosition functions * Refactor * Expose after dataset value * Consistently use this's property * Add jsdoc
* Ignore DOMExceptions thrown by assigning an invalid dataset property (#2133)toasted-nutbread2022-05-14
|
* Regex optimizations (#2132)toasted-nutbread2022-05-14
| | | | | | | * Remove regex construction for SimpleDOMParser.getElementsByClassName * Remove regex construction for CssStyleApplier._getRulesForClass * Rename, add jsdoc for clarity
* Structured content auto language (#2131)toasted-nutbread2022-05-14
| | | | | | | | | | | | | | | | | | | | | | * Pass JapaneseUtil instance to StructuredContentGenerator * Move body of createStructuredContent to an internal function * Create _createStructuredContentGenericElement * Wrap structured content in a <span> * Change _createStructuredContent to _appendStructuredContent * Add public appendStructuredContent function * Add missing return * Remove unused _createDocumentFragment * Automatically assign lang=ja for content with Japanese characters without an explicit language * Add test
* Add new structured content features: lists and the HTML `lang` attribute (#2129)Stephen Kraus2022-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for structured content lists and `list-style-type` style A full list of supported style types is documented here: https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type There's nothing in this code preventing a term bank from assigning, for example, a `list-style-type` style to a `div` element, but it doesn't seem like browsers will complain about things like that. * Add support for `lang` attribute in structured content Support added for the following node types: "ruby", "rt", "rp", "table", "thead", "tbody", "tfoot", "tr", "td", "th", "span", "div", "ol", "ul", "li", "a" I couldn't get it to work for the alt-hover text on "img" tags. Tests are included in the file "test/data/dictionaries/valid-dictionary/term_bank_1.json" * Add styles for structured content lists * Add override rules for new structured-content list styles see: https://github.com/FooSoft/yomichan/pull/2129 Co-authored-by: stephenmk <stephenmk@users.noreply.github.com>
* Hide popup on cursor exit (#2109)toasted-nutbread2022-04-03
| | | | | | | | | * Update phrasing * Add new options * Add settings * Implement
* Update Popup to not store the full options object (#2106)toasted-nutbread2022-04-03
|
* Theme updates (#2105)toasted-nutbread2022-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change siteColor to siteTheme * Fix potential null exception * Simplify * Update display theme assignment * Add a data-browser-theme attribute * Add "browser" option for theme * Create ThemeController * Add theme-controller.js to relevant pages * Use ThemeController * Simplify * Fix 'light' being used instead of 'default' * Update the settings values to more accurately reflect their usage * Change default site theme in display.js * Remove async * Restore async for consistency
* Text scanner event capture (#2101)toasted-nutbread2022-04-02
| | | | | * Add capture parameter to event listeners * Enable capture
* Workaround for Google Docs canvas rendering updates (#2096)toasted-nutbread2022-04-02
|
* Structured content links (#2089)toasted-nutbread2022-03-17
| | | | | | | | | | | | | | | | | * Update CSS to JSON converter to generalize the remove-property comment * Fix navigation not being updated when _clearContent is run * Add structured content schema for link tags * Add test links * Add external-link icon * Pass Display instance to DisplayContentManager * Update structured content generation * Update link styles
* AnkiTemplateRendererContentManager (#2088)toasted-nutbread2022-03-14
| | | | | | | | | * Make function private * Update comments * Refactor the content manager that is provided to StructuredContentGenerator in AnkiTemplateRenderer * Update function to not be async, for API parity
* Rename MediaLoader to DisplayContentManager (#2087)toasted-nutbread2022-03-14
|
* Update ClipboardReader.getImage implementation (#2085)toasted-nutbread2022-03-13
|
* Improve Anki storeMediaFile (#2084)toasted-nutbread2022-03-13
| | | | | * Use the return value of storeMediaFile * Update documentation
* Add additional Anki card marker aliases (#2083)toasted-nutbread2022-03-13
|
* Add support for logging Anki errors on the settings page (#2073)toasted-nutbread2022-02-20
|
* Update anki card frequency (#2065)toasted-nutbread2022-02-05
| | | | | * Prefer to use displayValue for Anki card frequency values * Update test data
* Update copyright date (#2062)toasted-nutbread2022-02-02
| | | | | | | * Update eslint settings * Update 2021 files * Update other files
* Update sentence termination characters (#2059)toasted-nutbread2022-02-02
| | | | | | | * Add vertical punctuation to terminationCharacters * Upgrade settings * Update tests
* Set `Content-Type` header of AnkiConnect requests to `application/json`archiif2022-01-05
|
* 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
* Dictionary database term source info (#2039)toasted-nutbread2021-12-17
| | | | | | | | | | | | | | | | | | | * Update DictionaryDatabase._findMultiBulk's createResult callback signature * Simplify _splitField use * Update sequence * Expose new fields 'matchType' and 'matchSource' as part of term data * Expose matchType and matchSource as part of TermSource * Update sourceTermExactMatchCount calculation * Update test data * Expose matchType and matchSource info in HTML attributes * Add primaryMatchTypes attribute
* Replace 'wildcard' parameter with 'matchType' (#2038)toasted-nutbread2021-12-17
|
* Fix source name not being used (#2036)toasted-nutbread2021-12-14
|
* Fix non-text <input> elements being included in scanning content (#2034)toasted-nutbread2021-12-14
|
* Fix typo in comments (#2032)toasted-nutbread2021-12-14
|
* Add AccessibilityController class, which dynamically registers (#2024)toasted-nutbread2021-11-23
| | | and unregisters the google-docs.js content script
* Google Docs accessibility refactor (#2023)toasted-nutbread2021-11-23
| | | | | | | | | | | | | | | | | * Skip urlRegex if it's used as a filter * Add getRequiredContentScriptRegistrationPermissions function * Add a reentrant check to google-docs.js * Remove script node * Move forceGoogleDocsHtmlRendering check into google-docs.js * Replace document-start.js usage with google-docs.js * Remove documentStart handling * Add missing parameter descriptions
* ScriptManager updates (#2022)toasted-nutbread2021-11-23
| | | | | | | | | | | * Fix spacing * Add more parameters to injectStylesheet * Add more parameters to injectScript * Update ScriptManager to support content script registration * Add webNavigation as an optional permission
* ScriptManager (#2021)toasted-nutbread2021-11-22
| | | | | * Create ScriptManager class * Use ScriptManager in Backend
* Action handler name disambiguation (#2018)toasted-nutbread2021-11-21
| | | | | | | | | | | | | | | | | | | * Disambiguate PopupFactory action handlers * Update HotkeyHandler action names * Disambiguate Frontend action handlers * Disambiguate Display action handlers * Disambiguate PopupPreviewFrame action handlers * Disambiguate Yomichan action handlers * Disambiguate Frontend action handlers * Disambiguate Display action handlers * Disambiguate SearchDisplayController action handlers
* FrameOffsetForwarder fixes (#2017)toasted-nutbread2021-11-21
| | | | | * Fix handling of null iframe rect * Handle errors inside of getOffset
* General refactoring (#2016)toasted-nutbread2021-11-21
| | | | | | | * Remove // Public comments * Fix errors * Remove source parameter from Popup*.setOptionsContext
* Refactor isExtensionUrl (#2015)toasted-nutbread2021-11-21
| | | | | * Update isExtensionUrl to work even if the extension is unloaded * Simplify
* Don't clear the selection before the text scanner has been enabled (#2006)toasted-nutbread2021-11-13
|
* Fix search page not being cleared properly (#2005)toasted-nutbread2021-11-13
|
* JSDoc update (#1996)toasted-nutbread2021-10-31
| | | | | * Update core.js docs to include types. * Update docs
* Don't stop audio playback when hiding a popup (#1995)toasted-nutbread2021-10-21
|
* Display menu button (#1992)toasted-nutbread2021-10-17
| | | | | * Implement new menu which includes a debug log option * Update wording
* Display button updates (#1991)toasted-nutbread2021-10-17
| | | | | * Update display buttons * Remove use of _addMultipleEventListeners
* String frequency support (#1989)toasted-nutbread2021-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | * Restore support for string frequency values * Add support for {value, displayValue} frequencies * Update test data * Improve number parsing of string frequencies * Improve reading detection * Expose a displayValue property for frequency information * Update docs * Expose displayValue to Anki note data * Fix translator * Update display generation * Update test data * Update counts
* Fix query being set to null when an empty search page is opened (#1988)toasted-nutbread2021-10-14
|