aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/api.js
Commit message (Collapse)AuthorAge
* 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
* Mecab test (#1361)toasted-nutbread2021-02-08
| | | | | | | * Update Mecab API * Add testMecab API function * Add a test button for the Mecab component
* Remove unused api functions (#1354)toasted-nutbread2021-02-08
| | | | | | | * Remove screenshotGet * Remove downloadDefinitionAudio * Remove clipboardGetImage
* Audio system refactoring (#1275)toasted-nutbread2021-01-18
| | | | | | | | | | | | | | | * Simplify details * Simplify audio creation * Return an array of sources instead of a single item * Use sourceIndex instead of index * Rename APIs * Return more info about the source * Return source instead of sourceIndex
* Support suspending new anki cards (#1240)toasted-nutbread2021-01-14
| | | | | | | | | | | * Add new option: anki.suspendNewCards * Update Anki APIs * Suspend card based on options * Add setting * Disable wrap for toggle property
* Refactor display anki functions (#1224)toasted-nutbread2021-01-11
| | | | | | | | | | | * Refactor note adding/viewing functions * Move _addDefinition * Update where anki field templates are assigned * Update _createNote to not include options/templates arguments * Simplify getAnkiNoteInfo to not require duplicateScope
* Core refactor (#1207)toasted-nutbread2021-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | * Copy set intersection functions * Remove unused functions * Simplify url check * Remove parseUrl * Simplify stringReverse * Remove hasOwn due to infrequent use * Rename errorToJson/jsonToError to de/serializeError For clarity on intended use. * Fix time argument on timeout * Add missing return value * Throw an error for unexpected argument values * Add documentation comments
* Update copyright year (#1194)toasted-nutbread2021-01-01
| | | | | * Update copyright year * Remove redundant Author info
* Add info page (#1102)toasted-nutbread2020-12-12
| | | | | | | | | | | * Add api.getAnkiConnectVersion * Enable basic functionality when certain features/elements aren't present * Add info page * Update information links * Update info link on the settings v2 page
* Fix kanji note creation (#1069)toasted-nutbread2020-11-26
| | | | | | | * Fix kanji note creation * Move try/catch for consistency * Move audio normalization
* Add api.isAnkiConnected (#1011)toasted-nutbread2020-11-08
|
* Query parser generator refactor (#1006)toasted-nutbread2020-11-08
| | | | | | | | | | | | | * Simplify select generation * Refactor text generation * Change optional argument * Remove query-parser-templates.html * Simplify prepare * Simplify preview
* Add clipboard-text Anki field (#863)toasted-nutbread2020-09-26
| | | | | | | * Add clipboard-text anki field * Add markers * Update clipboard injection
* Audio system refactor (#858)toasted-nutbread2020-09-26
| | | | | | | | | | | | | | | * Refactor AudioUriBuilder * Add downloadAudio function * Refactor AudioSystem * Update API usage * Rename file * Update scripts * Add prepare calls
* Dictionary delete improvements (#844)toasted-nutbread2020-09-19
| | | | | | | * Change where clearDatabaseCaches occurs * Move dictionary deletion into the settings page * Remove api.deleteDictionary
* Cleanup unused utils (#832)toasted-nutbread2020-09-15
| | | | | | | | | * Remove api.optionsSave * Remove getOptionsMutable and getOptionsFullMutable * Remove util.js * Remove yomichanBackend
* Database change event (#826)toasted-nutbread2020-09-13
| | | | | * Add api.triggerDatabaseUpdated and yomichan.on('databaseUpdated') * Update databaseUpdated event usage
* OptionsUtil refactor / options default values (#807)toasted-nutbread2020-09-11
| | | | | | | | | | | | | | | | | | | | | | | * Replace _readFile with _fetchAsset for consistency with Backend * Fix error messages * Make OptionsUtil non-static * Update how default options are assigned * Add createValidatingProxy * Add validate, update _onApiSetAllSettings * Remove unused api.optionsSchemaGet * Remove Backend._optionsSchema * Update OptionsUtil to create its own JsonSchemaValidator * Rename Backend._optionsSchemaValidator * Make getDefault non-async
* Use Anki classes directly in Display (#804)toasted-nutbread2020-09-10
| | | | | | | | | | | * Add _getTemplates function * Add template renderer to display pages * Add AnkiNoteBuilder to Display * Update AnkiTemplatesController to directly use TemplateRenderer * Remove old APIs
* Add api.injectAnkiNoteMedia (#803)toasted-nutbread2020-09-10
|
* Anki note api functions (#802)toasted-nutbread2020-09-10
| | | | | | | * Assign duplicateScope to a variable * Add api.addAnkiNote * Add api.getAnkiNoteInfo, update returned data format
* AudioUriBuilder simplification (#799)toasted-nutbread2020-09-10
| | | | | | | | | | | | | * Rename variables to disambiguate * Update handler argument convention * Update getUri argument convention * Change _getAudioUri argument convention * Change getDefinitionAudio argument convention * Add api.getDefinitionAudio definition
* Update the AnkiController class to use an instance of AnkiConnect directly ↵toasted-nutbread2020-09-09
| | | | | | | (#795) * Update AnkiController to use AnkiConnect instance directly * Remove unused
* Anki screenshot refactor (#791)toasted-nutbread2020-09-09
| | | | | | | * Use more consistent style for injectScreenshot * Move screenshot generation into AnkiNoteBuilder/Backend * Get optionsContext before await
* Add api.clipboardGetImage (#778)toasted-nutbread2020-09-06
| | | | | | | | | | | * Rename clipboardPasteTarget to just target * Remove else block * Add helper functions * Defer assignment of clipboard paste target * Add api.clipboardGetImage
* Add api.isTabSearchPopup (#763)toasted-nutbread2020-09-04
| | | | | * Add api.isTabSearchPopup * Fix missing asyncs
* Defer assignment of marker (#762)toasted-nutbread2020-09-04
|
* Settings dictionary import refactor (#759)toasted-nutbread2020-09-04
| | | | | | | * Fix .purge not re-opening the database after deletion failure * Create DictionaryImportController * Remove backend dictionary import
* Reusable backend popup window (#673)toasted-nutbread2020-07-18
| | | | | | | | | | | * Update _updateSearchQuery to return the promise * Update how the clipboard search popup is opened * Create an API function to open the search popup * Skip animation on popup creation * Add API function
* Port name details (#667)toasted-nutbread2020-07-18
| | | | | | | | | * Use a stringified JSON details object for extension port names * Fix incorrect frame ID check * Add support for connecting to different tabs * Add function for invoking on a different tab
* Extension unload detection (#647)toasted-nutbread2020-07-03
| | | | | | | * Update how extension unload is detected * Remove event handlers and use yomichan.isExtensionUnloaded instead * Update terminology
* Use deferPromise (#630)toasted-nutbread2020-06-28
| | | | | | | * Use deferPromise * Move definition * Implement promiseTimeout using deferPromise
* Shadow DOM container for popup iframes (#623)toasted-nutbread2020-06-24
| | | | | | | | | | | | | | | * Add support for injecting stylesheets into a custom parent node * Add api.getStylesheetContent * Add support for injecting a CSS file's content * Add usePopupShadowDom option * Use a per-parentNode cache * Add support for using a shadow DOM wrapper around popup iframes * Ignore the popup container instead of the frame
* Use cross frame API (#553)toasted-nutbread2020-06-07
| | | | | | | | | * Use new CrossFrameAPI for popup proxy communication * Remove use of old cross-frame communication classes * Remove use of old cross-frame communication files * Make the crossFrame object a member of the api object
* Limit action port message size (#587)toasted-nutbread2020-05-31
| | | | | | | | | | | * Add onDisconnect handler * Update how error is posted * Update action ports to send long messages in fragments * Remove ack timer * Move message destructuring into try block
* Backup update (#582)toasted-nutbread2020-05-30
| | | | | | | | | * Add function to assign all settings * Update how settings backups are restored * Remove page reload * Update profile index after importing
* Settings binder (#542)toasted-nutbread2020-05-24
| | | | | | | | | | | | | | | | | | | | | | | * Fix _modifySetting being async * Return values for modifySettings's set and splice actions * Add apiGetSettings * Create a class which can accumulate tasks to run in bulk * Create a class which binds input elements to customizable sources * Create class which binds input elements to settings * Add support for value transforms * Remove redundant ObjectPropertyAccessor.getPathArray * Fix not using correct types for input.min/max/step * Fix wrong condition * Use api object
* API refactor (#532)toasted-nutbread2020-05-24
| | | | | | | | | | | | | * Convert api.js into a class instance * Use new api.* functions * Fix missing binds * Group functions with progress callbacks together * Change style * Fix API override not working
* Add apiModifySettings (#501)toasted-nutbread2020-05-06
| | | | | | | | | | | | | | | | | * Update getProfile/getProfileFromContext to store this.options in a variable * Add useSchema parameter to options getter functions * Add apiModifySettings * Use apiModifySettings instead of apiOptionsSet * Remove apiOptionsSet * Fix incorrect deleteCount check * Require explicit scope for options * Throw on invalid scope
* Move util database modification functions (#499)toasted-nutbread2020-05-06
| | | | | | | | | | | | | | | | | | | * Update onProgress callback to handle multiple arguments * Add apiImportDictionaryArchive * Add apiDeleteDictionary * Make onProgress the last argument for consistency * Remove deprecated util functions * Fix issue with missing progress args * Remove function calls which modify the database from Translator * Update tests * Fix errors not being serialized correctly in _createActionListenerPort
* Popup init update (#497)toasted-nutbread2020-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add API function to send a message to a specific frameId in a tab * Update _windowMessageHandlers to support additional info per handler * Remove message token * Add new authorization check * Set up new initialization handler * Update initialization * Remove message token * Replace 'prepare' with 'configure' * Create new prepare function * Change configure guard * Log errors in onMessage * Improve popup initialize function * Clear secret/token in _resetFrame * Remove backend message token * Clear src and srcdoc attributes before loading * Don't treat about:blank unloads as load events
* Api invoke with progress (#483)toasted-nutbread2020-05-02
| | | | | | | * Create an internal API function to open a port * Create system for running actions over a special port * Don't assign in expression
* Error logging refactoring (#454)toasted-nutbread2020-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Create new logging methods on yomichan object * Use new yomichan.logError instead of global logError * Remove old logError * Handle unhandledrejection events * Add addEventListener stub * Update log function * Update error conversion to support more types * Add log event * Add API log function * Log errors to the backend * Make error/warning logs update the badge * Clear log error indicator on extension button click * Log correct URL on the background page * Fix incorrect error conversion * Remove unhandledrejection handling Firefox doesn't support it properly. * Remove unused argument type from log function * Improve function name * Change console.warn to yomichan.logWarning * Move log forwarding initialization into main scripts
* Add API for getting media datatoasted-nutbread2020-04-18
|
* Update the parameters passed to various audio-related functionstoasted-nutbread2020-04-18
|
* Merge pull request #447 from toasted-nutbread/util-conversionstoasted-nutbread2020-04-18
|\ | | | | Util conversions
| * Convert some util* functions into api* functionstoasted-nutbread2020-04-11
| |
* | move QueryParser.parseText to Backendsiikamiika2020-04-13
|/
* Merge pull request #437 from toasted-nutbread/backend-api-handler-changestoasted-nutbread2020-04-11
|\ | | | | Backend api handler changes
| * apiBroadcast => apiBroadcastTabtoasted-nutbread2020-04-10
| |