summaryrefslogtreecommitdiff
path: root/ext/bg/js
Commit message (Collapse)AuthorAge
* 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
* Dynamic loader load style (#521)toasted-nutbread2020-05-19
| | | | | | | | | * Remove unnecessary load of /fg/css/client.css * Replace dynamicLoader.loadStyles with dynamicLoader.loadStyle * Replace Popup._injectStylesheet with dynamicLoader.loadStyle * Remove unused global
* Omit the sound tag if it's empty (#525)toasted-nutbread2020-05-09
|
* 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
* Text scanner refactor (#517)toasted-nutbread2020-05-08
| | | | | | | | | | | | | | | * Fix return type * Pass search function as a constructor argument * Pass constructor as a details object For consistency with other complex constructors and improved semantics. * Convert _ignorePoints to a single optional function * Organize functions * Rename ignorePoints to ignorePoint
* Popup proxy host refactor (#516)toasted-nutbread2020-05-08
| | | | | | | | | | | | | | | | | | | | | | | * Rename PopupProxyHost to PopupFactory * Update FrontendApiReceiver to support non-async handlers * Make some functions non-async * Make setCustomCss non-async * Make setContentScale non-async * Remove static * Rename variables * Pass frameId into PopupFactory's constructor * Change FrontendApiReceiver source from popup-proxy-host to popup-factor * Rename _invokeHostApi to _invoke * Rename PopupProxy.getHostUrl to getUrl
* Query parser refactor (#514)toasted-nutbread2020-05-07
| | | | | | | * Make functions private * Make fields private * Organize
* 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
* Japanese util refactor (#510)toasted-nutbread2020-05-06
| | | | | | | | | | | * Convert mixed japanese.js to utility class * Copy functions from bg/js/japanese.js into mixed/js/japanese.js * Remove bg/js/japanese.js * Make wanakana dependency optional * Update tests
* Remove search query parser inheritance (#509)toasted-nutbread2020-05-06
| | | | | | | | | * Remove getMouseEventListeners override * Use this._options instead of this.options * Make QueryParser use composition instead of inheritance for TextScanner * Remove repeat call to document.querySelector('#query-parser-content')
* Frontend refactor (#508)toasted-nutbread2020-05-06
| | | | | | | | | * Use this.popup instead of this.frontend.popup * Rename Frontend.popup to _popup * Make Frontend functions private * Clean up Frontend constructor
* 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
* Remove invalid file name characters from Anki media files (#496)toasted-nutbread2020-05-06
| | | | | * Replace invalid file name characters * Replace "filename" with "fileName"
* Text selection fixes (#511)siikamiika2020-05-07
| | | | | * select matched text in Frontend.findKanji * blur search query input when setting content
* Fix modifier key condition data (#506)siikamiika2020-05-06
| | | | | | | | | | | | | * save transformed data for modifier key conditions * validate transformed input * fix regression * undo rename * refactor transformInput handling * don't overwrite value with null
* Extract textSource text inside TextScanner (#500)siikamiika2020-05-05
| | | | | * extract text inside TextScanner * clone textSource before text extraction
* Modifier key profile condition (#487)siikamiika2020-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | * update Frontend options on modifier change * add modifier key profile condition * use select element for modifier condition value * support "is" and "is not" modifier key conditions * use plural * remove dead null check it's never null in that function * pass element on rather than assigning to this * rename event * remove Firefox OS key to Meta detection * hide Meta from dropdown on Firefox * move input type
* 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
* Remove Frontend inheritance (#486)toasted-nutbread2020-05-02
| | | | | | | | | | | | | | | * Make Frontend use composition instead of inheritance for TextScanner * Use push instead of concat * Update setOptions and setEnabled APIs * Update how onWindowMessage event listener is added/removed * Rename options to _options * Use bind instead of arrow function * Fix selection being cleared due to settings changes
* 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
* Frontend refactor (part 1) (#484)toasted-nutbread2020-04-27
| | | | | | | | | | | | | | | | | | | * Remove _getVisualViewportScale * Use super's mouse event listener definitions * Remove redundant override * Remove getTouchEventListeners override * Rename Display.onSearchClear to onEscape * Change onSearchClear to clearSelection and use an event * Update how text is marked for selection and deselection * Replace onError with yomichan.logError * Update setEnabled to refresh all event listeners
* Use dynamicLoader for main (#481)toasted-nutbread2020-04-26
| | | | | * Update style of search-main and float-main to have better parity * Use dynamicLoader to inject scripts and CSS
* 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
* Update Popup and DisplayFloat optionsContext from Frontend (#464)siikamiika2020-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | * set optionsContext from Frontend * update Popup+Display options on Frontend change * remove popup setOptions * only update DisplayFloat options from Frontend * fix optionsContext usage * fix preview frame arguments * keep Frontend URL up to date * cache url * fix preview frame * trigger modifyingProfileChange in correct places * remove async from function not using await * refactor optionsContext in Frontend
* Merge pull request #463 from toasted-nutbread/explicit-entry-pointtoasted-nutbread2020-04-23
|\ | | | | Explicit entry points
| * Use IIFE for entry pointstoasted-nutbread2020-04-22
| |
| * Create popup-preview-frame-main.jstoasted-nutbread2020-04-19
| |
| * Rename search-frontend.js to search-main.jstoasted-nutbread2020-04-19
| | | | | | | | Also move DisplaySearch creation into the main() function.
| * Rename context.js to context-main.jstoasted-nutbread2020-04-19
| |
| * Create background-main.jstoasted-nutbread2020-04-19
| |
| * Change frontend-initialize.js to content-script-main.jstoasted-nutbread2020-04-19
| |
* | fix custom anki templatessiikamiika2020-04-23
| |
* | Use wanakana object directlytoasted-nutbread2020-04-20
|/
* Add documentationtoasted-nutbread2020-04-19
|
* Rename loadImage to loadImageBase64 for claritytoasted-nutbread2020-04-19
|
* Make getFileNameExtension properly handle directory separatorstoasted-nutbread2020-04-19
|
* Use 'content' instead of 'source' to contain media file datatoasted-nutbread2020-04-19
|
* Add API for getting media datatoasted-nutbread2020-04-18
|
* Add support for importing and storing media filestoasted-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