summaryrefslogtreecommitdiff
path: root/ext/js/comm
Commit message (Collapse)AuthorAge
* Update how ts comments are handledtoasted-nutbread2023-12-04
|
* Update timer types and suchtoasted-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
|
* Modernize codebaseDarius Jahandarie2023-11-04
| | | | | | - Use ES modules - Remove vendored libs and build them from npm using esbuild - Switch from JSZip to zip.js
* create both cross-frame ports in the backgroundpraschke2023-09-30
| | | | | | | | | | on Chrome (currently 117), the port created in the content script with runtime.connect does not properly receive an onDisconnect event when the service worker sleeps. the port created in the background with tabs.connect does receive the event, so create both ports with tabs.connect. fixes #241.
* 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
|
* Documentation updates (#2257)toasted-nutbread2022-10-16
| | | | | | | * Document Backend * Document RequestBuilder * Document some of AnkiConnect
* Clipboard updates (#2254)toasted-nutbread2022-10-15
| | | | | | | | | | | | | | | | | | | * Rename * Rename vars * Refactor paste target * Prevent most CSS url() properties from loading * Add helper function to clear rich function * Add useRichText argument * Update condition for using readText * Fix indent * Update CSS
* API loadExtensionScripts (#2233)toasted-nutbread2022-09-24
| | | | | * Inject MV3 scripts immediately * Add api.loadExtensionScripts
* Optimize AnkiConnect.findNoteIds (#2190)toasted-nutbread2022-08-20
| | | | | | | * Use for loop rather than map * Add _getNoteQuery * Optimize findNoteIds to reduce repeat queries
* Add support for Anki API key (#2169)toasted-nutbread2022-05-30
| | | | | | | | | | | | | * Update material.css to support password fields * Support password * Add "apiKey" setting * Use apiKey * Update options if API key changes * Update tests
* Rename anki.js to anki-connect.js to more accurately reflect class name (#2167)toasted-nutbread2022-05-29
|
* Add support for guiEditNote to view notes (#2143)toasted-nutbread2022-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add AnkiConnect.guiEditNote * Update _onApiNoteView to first try guiEditNote * Add setting * Update noteView API * Use setting * Return which mode was used * Update DisplayGenerator * Handle errors in DisplayAnki * Update docs * Add isErrorUnsupportedAction function * Add an allowFallback option to noteView * Disambiguate * Simplify now that preferredMode isn't used * Update settings info * Implement test buttons * Update styles * Update status visibility * Wrap layout * Update description * Update date
* Add apiReflect and apiExists to AnkiConnect (#2150)toasted-nutbread2022-05-22
|
* Anki findNotes (#2152)toasted-nutbread2022-05-21
| | | | | * Add findNotes API * Add api.findAnkiNotes
* 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
* 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 support for logging Anki errors on the settings page (#2073)toasted-nutbread2022-02-20
|
* Update copyright date (#2062)toasted-nutbread2022-02-02
| | | | | | | * Update eslint settings * Update 2021 files * Update other files
* Set `Content-Type` header of AnkiConnect requests to `application/json`archiif2022-01-05
|
* FrameOffsetForwarder fixes (#2017)toasted-nutbread2021-11-21
| | | | | * Fix handling of null iframe rect * Handle errors inside of getOffset
* DOMRect update (#1973)toasted-nutbread2021-09-30
| | | | | | | | | * Compare using left/top rather than x/y * Simplify * Update Popup*.getFrameRect to return a custom structure * Don't use x/y on DOMRect
* Frequency dictionary sort (#1938)toasted-nutbread2021-09-26
| | | | | | | | | | | | | | | | | * Add sortDictionary/sortDictionaryOrder options * Update options * Add API.getTermFrequencies * Add settings * Implement frequency dictionary sorting * Update test * Update test data * Fix handling of undefined rank-based frequencies
* Dictionary worker updates (#1914)toasted-nutbread2021-08-28
| | | | | | | * Add support for running getDictionaryCounts via DictionaryWorker * Run dictionary integrity checks on a separate thread * Remove api.getDictionaryCounts
* Text parse updates (#1811)toasted-nutbread2021-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Expose more settings to QueryParser * Rename textParse to parseText * Refactor * Convert reading inside QueryParser rather than Backend * Remove use of readingMode from backend * Rename * Update parseText args * Simplify * Update results * Move use of optionsContext * Run mecab and internal parser in parallel * Added "dictionary-reading" reading mode * Update romaji conversion case
* Add support for injecting dictionary media into Anki cards (#1805)toasted-nutbread2021-07-06
|
* Refactor display audio options (#1717)toasted-nutbread2021-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update how options are updated and stored in DisplayAudio * Add source list * Improve menus for custom json * Clear cache after options update * Move function * Update public API * Simplify playing audio from a specific source * Simplify audio list * Refactor audio source usage * Refactoring * Refactor argument names * Fix incorrect source usage * Remove unused * Remove return value * Simplify details * Simplify Anki card audio details * Update the data that is passed to AudioDownloader * Simplify schema handling * Remove unnecessary details
* Improve support for sandboxed iframes (#1704)toasted-nutbread2021-05-23
| | | | | | | * Add more tests * Improve handling of errors from setupFrame * Passively handle errors when contentDocument is null
* Show any custom tags on words that have anki cards created (#1628)soriac2021-04-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Proof-of-concept for showing card tags (#1626) * Resolved most PR comments: - Added a snackbar notification when clicking tag button - Replaced magnifying glass icon with new tag icon - Button now contains a span w/icon, to use text color - Removed unnecessary attributes from button - Backend now returns full noteInfos object - Frontend now handles filtering tags * Add options to show/hide tag button & filter tags * Do not show tags button if, after filtering, we have zero tags. * Change tags option to enums, optimize tags intersection check & fix code style. * Update options-util.js to include new tag options. * Fix wording on new tag setting. * Add CSS to remove hidden buttons from the display layout. * getAnkiNoteInfo extra parameter for additional info. * Add new tag option to tests. * Remove unnecessary changes related to anki tags option. * Code style fixes.
* Update dictionary entry terminology (#1592)toasted-nutbread2021-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update terminology * Update terminology in display.js * Update terminology in display-audio.js * Update terminology in text-scanner.js * Update terminology in backend.js * Update terminology in mecab.js * Update terminology in audio-downloader.js * Update terminology in translator-vm.js * Update terminology in dictionary-data-util.js * Update terminology in dictionary-database.js * Update terminology in japanese-util.js * Change/upgrade {expression} to {term} * Update terminology in test-japanese.js * Update terminology in test-database.js * Update terminology in anki-templates-controller.js * Update terminology in anki-note-builder.js * Update terminology in backend.js * Update terminology in text-scanner.js * Update terminology in display.js * Update terminology in display.js
* Make MediaUtil a static class (#1525)toasted-nutbread2021-03-14
|
* Text source element scanning improvements (#1464)toasted-nutbread2021-02-28
| | | | | | | | * Add api.textHasJapaneseCharacters * Add support for empty query * Add support for showing the query parser for TextSourceElement with content that does not start with Japanese text
* AnkiUtil (#1439)toasted-nutbread2021-02-24
| | | | | | | | | | | | | | | | | | | * Add AnkiUtil * Update AnkiConnect to use AnkiUtil * Use AnkiUtil in AnkiNoteBuilder * Replace containsAnyMarker with AnkiUtil.stringContainsAnyFieldMarker * Add AnkiUtil.getFieldMarkers * Add fieldsObjectContainsMarker to AnkiUtil * Remove unused global * Remove unused parameter: enabled * Add cloneFieldMarkerPattern
* Cleanup yomichan api (#1394)toasted-nutbread2021-02-14
| | | | | | | * Move invokeMessageHandler to core.js * Move getMessageResponseResult to backghend.js * Replace getTemporaryListenerResult
* Log refactoring (#1393)toasted-nutbread2021-02-14
| | | | | | | | | | | | | * Create Logger class and log instance * Replace yomichan.logWarning with log.warn * Replace yomichan.logError with log.error * Replace yomichan.log with log.log * Update the Yomichan class to use the global log object * Update lint rules
* Move api to yomichan object (#1392)toasted-nutbread2021-02-14
| | | | | | | | | | | * Move cross frame API from API to Yomichan * Add API instance to Yomichan * Move api global to yomichan.api * Pass yomichan to API * Remove IIFE
* Api prepare refactor (#1391)toasted-nutbread2021-02-14
| | | | | * Refactor API preparation * Run yomichan.prepare manually in the entry point function
* Util rename (#1389)toasted-nutbread2021-02-14
| | | | | | | | | | | | | | | * Rename MediaUtility to MediaUtil for consistency * Update variable names * Rename media-utility.js to media-util.js * Rename ProfileConditions to ProfileConditionsUtil * Rename variables * Move profile-conditions.js to profile-conditions-util.js * Rename test-profile-conditions.js to test-profile-conditions-util.js
* 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
* Move fg/js (#1384)toasted-nutbread2021-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | * Move fg/js/frame-ancestry-handler.js to js/comm/frame-ancestry-handler.js * Move fg/js/frame-offset-forwarder.js to js/comm/frame-offset-forwarder.js * Move fg/js/dom-text-scanner.js to js/dom/dom-text-scanner.js * Move fg/js/text-source-element.js to js/dom/text-source-element.js * Move fg/js/text-source-range.js to js/dom/text-source-range.js * Move fg/js/float-main.js to js/display/popup-main.js * Move fg/js/content-script-main.js to js/app/content-script-main.js * Move fg/js/frontend.js to js/app/frontend.js * Move fg/js/popup-factory.js to js/app/popup-factory.js * Move fg/js/popup-proxy.js to js/app/popup-proxy.js * Move fg/js/popup-window.js to js/app/popup-window.js * Move fg/js/popup.js to js/app/popup.js
* Move mixed/js (#1383)toasted-nutbread2021-02-13
* Move mixed/js/core.js to js/core.js * Move mixed/js/yomichan.js to js/yomichan.js * Move mixed/js/timer.js to js/debug/timer.js * Move mixed/js/hotkey-handler.js to js/input/hotkey-handler.js * Move mixed/js/hotkey-help-controller.js to js/input/hotkey-help-controller.js * Move mixed/js/hotkey-util.js to js/input/hotkey-util.js * Move mixed/js/audio-system.js to js/input/audio-system.js * Move mixed/js/media-loader.js to js/input/media-loader.js * Move mixed/js/text-to-speech-audio.js to js/input/text-to-speech-audio.js * Move mixed/js/comm.js to js/comm/cross-frame-api.js * Move mixed/js/api.js to js/comm/api.js * Move mixed/js/frame-client.js to js/comm/frame-client.js * Move mixed/js/frame-endpoint.js to js/comm/frame-endpoint.js * Move mixed/js/display.js to js/display/display.js * Move mixed/js/display-audio.js to js/display/display-audio.js * Move mixed/js/display-generator.js to js/display/display-generator.js * Move mixed/js/display-history.js to js/display/display-history.js * Move mixed/js/display-notification.js to js/display/display-notification.js * Move mixed/js/display-profile-selection.js to js/display/display-profile-selection.js * Move mixed/js/japanese.js to js/language/japanese-util.js * Move mixed/js/dictionary-data-util.js to js/language/dictionary-data-util.js * Move mixed/js/document-focus-controller.js to js/dom/document-focus-controller.js * Move mixed/js/document-util.js to js/dom/document-util.js * Move mixed/js/dom-data-binder.js to js/dom/dom-data-binder.js * Move mixed/js/html-template-collection.js to js/dom/html-template-collection.js * Move mixed/js/panel-element.js to js/dom/panel-element.js * Move mixed/js/popup-menu.js to js/dom/popup-menu.js * Move mixed/js/selector-observer.js to js/dom/selector-observer.js * Move mixed/js/scroll.js to js/dom/window-scroll.js * Move mixed/js/text-scanner.js to js/language/text-scanner.js * Move mixed/js/cache-map.js to js/general/cache-map.js * Move mixed/js/object-property-accessor.js to js/general/object-property-accessor.js * Move mixed/js/task-accumulator.js to js/general/task-accumulator.js * Move mixed/js/environment.js to js/background/environment.js * Move mixed/js/dynamic-loader.js to js/scripting/dynamic-loader.js * Move mixed/js/dynamic-loader-sentinel.js to js/scripting/dynamic-loader-sentinel.js