aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
Commit message (Collapse)AuthorAge
* 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
* Generic database (#600)toasted-nutbread2020-06-21
| | | | | | | | | | | | | | | | | | | * Update test * Rename db to _db * Create GenericDatabase class * Catch prepare error * Allow database to be purged even if it was not open * Remove unused functions * Change static functions to non-static * Delete and count using the media object store * Update tests
* Optimize anki note field generation (#611)toasted-nutbread2020-06-21
|
* Template renderer class (#574)toasted-nutbread2020-06-15
| | | | | | | | | | | | | | | * Convert handlebars.js to a class * Move/rename function * Update helper registration * Rename helper functions * Limit cache size * Make render() async * Rename and move
* Update the badge icon if the backend experiences an error (#602)toasted-nutbread2020-06-13
|
* Immediate backend event handlers (#555)toasted-nutbread2020-06-07
| | | | | * Add function to await until prepare is completed * Create BackendEventHandler to synchronously set up event handling
* 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
* Update background global object usage (#556)toasted-nutbread2020-05-24
| | | | | | | * Omit global window object for scripts used on the background page * Validate document exists before using * Remove dom.js from background.html
* 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
* Cross frame communication (#531)toasted-nutbread2020-05-23
| | | | | | | * Set up new cross-frame port connector * Create classes for cross-frame API invocation with replies * Remove event listeners on disconnect
* Fix "tags" template (#539)siikamiika2020-05-22
| | | | | | | * fix tag templates for merge and group modes * update version upgrade * adjust upgrade replacement order
* Modifier key platform names (#519)siikamiika2020-05-09
| | | | | | | | | | | | | | | | | | | | | * wip * add environment class * use Environment class * use Environment for scanning modifier options * remove Environment in favor of API * await promise * use modifier symbols on macOS * fix key separator issues * if else to switch * simplify variable names
* Add contentScript parameter to backend message handlers (#512)toasted-nutbread2020-05-07
| | | | | | | * Add contentScript parameter to message handlers * Remove _validatePrivilegedMessageSender calls from handler functions * Reformat handlers
* 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
* Style fixes (#494)toasted-nutbread2020-05-02
| | | | | | | * Place multi-line expression parentheses on the correct line * Add function-paren-newline eslint rule * Add some additional eslint rules
* 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
* Refactor frontend API classes (#482)toasted-nutbread2020-05-02
| | | | | | | | | | | | | * Mark functions as private * Remove constructor side effects * Use safer handler invocation * Mark functions as private * Mark fields as private * Update BackendApiForwarder public API
* Anki audio download (#477)toasted-nutbread2020-05-02
| | | | | | | * Update how audio is added to Anki cards * Upgrade Anki templates * Update comments
* Add duplicateScope: 'deck' option (#476)toasted-nutbread2020-04-27
| | | | | | | | | * Add duplicateScope: 'deck' option * Add option to control duplicate scope * Use duplicateScope for findNoteIds * Update location of quotes
* 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
* Merge pull request #463 from toasted-nutbread/explicit-entry-pointtoasted-nutbread2020-04-23
|\ | | | | Explicit entry points
| * Create background-main.jstoasted-nutbread2020-04-19
| |
* | fix custom anki templatessiikamiika2020-04-23
|/
* Add API for getting media datatoasted-nutbread2020-04-18
|
* Fix _prepareError checktoasted-nutbread2020-04-18
|
* Remove unused globaltoasted-nutbread2020-04-18
|
* Update style, use isObjecttoasted-nutbread2020-04-18
|
* Show error status for prepare() errorstoasted-nutbread2020-04-18
|
* Add a delay before showing the loading statetoasted-nutbread2020-04-18
| | | | Intended to prevent flickering when startup is quick
* Update when/how badge state is changedtoasted-nutbread2020-04-18
|
* Update isPrepared to be consistent with DisplaySearch's isPreparedtoasted-nutbread2020-04-18
|
* Disable cache on the backend and fix a bug with the cache keytoasted-nutbread2020-04-18
|
* Update the parameters passed to various audio-related functionstoasted-nutbread2020-04-18
|
* Merge pull request #453 from toasted-nutbread/reuse-anki-instancetoasted-nutbread2020-04-18
|\ | | | | Reuse AnkiConnect instance
| * Remove unused globaltoasted-nutbread2020-04-17
| |
| * Pass anki reference to AnkiNoteBuilder constructortoasted-nutbread2020-04-12
| |
| * Use single instance of AnkiConnecttoasted-nutbread2020-04-12
| |
* | Merge pull request #447 from toasted-nutbread/util-conversionstoasted-nutbread2020-04-18
|\ \ | | | | | | Util conversions
| * | Convert some util* functions into api* functionstoasted-nutbread2020-04-11
| |/
* | Merge pull request #456 from siikamiika/parse-text-refactorsiikamiika2020-04-17
|\ \ | | | | | | Parse text refactor
| * | simplify to enable constant usagesiikamiika2020-04-14
| | |
| * | prevent infinite loop if source length is 0siikamiika2020-04-14
| | |
| * | assume and propagate strings for text parsingsiikamiika2020-04-13
| | |
| * | move QueryParser.parseText to Backendsiikamiika2020-04-13
| |/
* | Merge pull request #444 from toasted-nutbread/unused-globalstoasted-nutbread2020-04-13
|\ \ | |/ |/| Check for unused globals as part of CI
| * Remove unused globalstoasted-nutbread2020-04-10
| |