aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings
Commit message (Collapse)AuthorAge
* Yomichan object separation (#627)toasted-nutbread2020-06-28
| | | | | | | | | | | | | * Move "yomichan" object setup to a separate file * Update script imports * Align message handlers * Rename Yomichan.prepare to Yomichan.ready * Add new prepare function * Improve isExtensionUrl
* Make PopupFactory.prepare non-async (#625)toasted-nutbread2020-06-25
|
* Frontend initialization refactor (#610)toasted-nutbread2020-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Create member functions for ignoreElements and ignorePoint * Create addFullscreenChangeEventListener utility * Move popup creation management into Frontend * Move getUrl implementation * Remove old setup * Remove try/catch block * Error wrap * Add prepare call to TextScanner * Update depth when popup changes * Refactor how Frontend gets PopupFactory and frameId * Update popup preview to work * Update popup preview frame to use the frontend's popup * Update how nested popups are set up * Error wrap * Update how popups are set up on the search page * Error wrap * Error unwrap * Add missing prepare * Remove use of frontendInitializationData * Catch and log errors
* Detect language tags starting with "ja_" (#596)toasted-nutbread2020-06-13
|
* Update AudioController to not use mutable options references (#585)toasted-nutbread2020-05-30
|
* Generic settings controller merge (#584)toasted-nutbread2020-05-30
| | | | | | | | | * Update how optionsContext is assigned to targets * Add getSettings and modifySettings * Merge DOMSettingsBinder into GenericSettingController * Remove old DOMSettingsBinder
* Update how assignment of general.enableClipboardPopups works (#583)toasted-nutbread2020-05-30
|
* 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 AnkiController (#581)toasted-nutbread2020-05-30
| | | | | | | | | | | | | * Update how fields are populated * Update how fields are modified after a model change * Update how _onFieldsChanged assigns fields * Update how spinner is hidden * Remove jQuery usage * Use non-jQuery events
* Update AnkiTemplatesController (#580)toasted-nutbread2020-05-30
| | | | | | | * Use this._defaultFieldTemplates * Don't use mutable options * Remove some use of jQuery
* Update GenericSettingController to use DOMSettingsBinder (#578)toasted-nutbread2020-05-30
|
* SettingsController API update (#579)toasted-nutbread2020-05-30
| | | | | * Include optionsContext as part of optionsChanged event * Add get/modify functions
* Organize settings/main.js (#577)toasted-nutbread2020-05-30
|
* Use SettingsController (#576)toasted-nutbread2020-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use settingsController internally in settings/main.js * Replace modifyingProfileChange with SettingsController.optionsContextChanged * Update ClipboardPopupsController to use SettingsController * Store reference to checkbox * Use this._settingsController for everything * Change where current profile is initially assigned from * Remove some unnecessary async calls * Move setup calls * Update AnkiTemplatesController to use SettingsController * Cache default field templates * Update AnkiController to use SettingsController * Update AudioController to use SettingsController * Update SettingsBackup to use SettingsController * Update DictionaryController to use SettingsController * Update GenericSettingController to use SettingsController * Update ProfileController to use SettingsController * Remove unused * Remove unused * Replace some uses of api.options* functions * Fix missing awaits * Fix invalid function
* Fix frontend being null if messages are received early (#575)toasted-nutbread2020-05-30
|
* Generic settings controller + clipboard popups controller (#573)toasted-nutbread2020-05-29
| | | | | * Create GenericSettingController * Create ClipboardPopupsController
* Popup preview frame refactor (#572)toasted-nutbread2020-05-29
| | | | | | | | | | | | | | | * Use private variables * Use private methods * Update overrides * Make prepare called in the entry point function * Change format of handlers * Change where _apiOptionsGetOld is assigned * Rename class
* Convert popup-preview.js to a class (#571)toasted-nutbread2020-05-29
| | | | | * Convert popup-preview.js to a class * Don't invoke 'prepare'
* Convert dictionaries.js and storage.js to classes (#570)toasted-nutbread2020-05-29
| | | | | | | | | * Convert dictionaries.js to a class * Remove storage spinner * Convert storage.js to a class * Move dataset assignments into main.js
* Audio controller (#569)toasted-nutbread2020-05-29
| | | | | | | | | | | * Convert audio.js into a class * Move audio-ui.js classes into audio.js * Rename fields * Merge classes * Remove audio-ui.js
* Anki settings controllers (#567)toasted-nutbread2020-05-29
| | | | | * Convert anki-templates.js to a class * Convert anki.js to a class
* Change profile.js into a class (#566)toasted-nutbread2020-05-29
| | | | | | | * Update how settings profile is stored and accessed * Convert profiles.js into a class * Rename members of ProfileController
* Create class to abstract access, mutation, and events for settings (#565)toasted-nutbread2020-05-29
|
* DOM binder fixes (#564)toasted-nutbread2020-05-29
| | | | | * Fix incorrect updateValue function * Add source
* Settings backup refactor (#551)toasted-nutbread2020-05-24
| | | | | * Update backup.js to be a class * Move utilReadFileArrayBuffer
* 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
* Settings refactor (#541)toasted-nutbread2020-05-24
| | | | | | | | | | | | | | | | | * Remove debug info * Trigger onOptionsUpdated instead of formWrite when profile changes * Update how Anki field changes are observed * Update how general.enableClipboardPopups setting is changed * Change where ankiTemplatesUpdateValue occurs * Change where onDictionaryOptionsChanged occurs * Remove unused global declarations * Remove stray data attribute
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
| |
* | Use wanakana object directlytoasted-nutbread2020-04-20
|/
* Remove unused globaltoasted-nutbread2020-04-18
|
* Disable cache on the backend and fix a bug with the cache keytoasted-nutbread2020-04-18
|
* Remove de/structuring from public APItoasted-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
| |
* | Merge pull request #440 from toasted-nutbread/collapse-emphatic-sequencestoasted-nutbread2020-04-12
|\ \ | |/ |/| Add support for collapsing emphatic character sequences