summaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
Commit message (Collapse)AuthorAge
* 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
* Fix cross frame communication not exposing sourceTabId properly (#1379)toasted-nutbread2021-02-13
|
* Improve search page popup detection (#1378)toasted-nutbread2021-02-13
| | | | | | | | | | | | | | | * Add _getAllTabs function * Add _findTabs * Use _findTabs instead of _findTab * Remove _findTab * Refactor tab check * Add ability to search for a popup native window * Fix dangling comma
* Fix old settings page not being used properly (#1376)toasted-nutbread2021-02-12
|
* Move html files (#1375)toasted-nutbread2021-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move background.html to / * Move context.html to / * Move info.html to / * Move legal.html to / * Move permissions.html to / * Move pitch-accents-preview.html to / * Move popup-preview.html to / * Move search.html to / * Move settings.html to / * Move settings2.html to / * Move template-renderer.html to / * Move welcome.html to / * Move float.html to / * Move display-templates.html to /
* Move more data files (#1373)toasted-nutbread2021-02-12
| | | | | | | * Move deinflect.json * Move button.mp3 * Move fonts
* Move data folder (#1371)toasted-nutbread2021-02-12
| | | | | * Move handlebars template files * Move schema files
* Permissions button in browser action popup (#1368)toasted-nutbread2021-02-11
| | | | | | | | | | | | | | | | | | | | | * Add key icon * Update context icon styles * Add permissions links * Show warning badge if permissions are insufficient for certain settings * Create PermissionsUtil * Use PermissionsUtil in Backend * Update SettingsController to use PermissionsUtil * Update AnkiController to use getRequiredPermissionsForAnkiFieldValue * Show the permissions buttons/links on the context page when necessary * Update MV3 compatibility
* Add support for multiple types of audio (#1366)toasted-nutbread2021-02-10
|
* Fix window popup screenshot (#1365)toasted-nutbread2021-02-09
| | | | | | | | | | | * Pass tabId to the screenshot functionality * Make setVisibleOverride async * Fix argument order * Fix incorrect windowId * Remove unused argument
* Improve popup window ownership (#1364)toasted-nutbread2021-02-09
| | | | | | | | | | | | | | | | | * Update frameInformationGet to also return the tab ID * Add tabId to Frontend * Pass tabId/frameId to Display * Pass ownership information using setContent * Remove ownerFrameId for Popup classes * Use frameId instead of ownerFrameId for screenshotting * Use contentOrigin instead of owner * Update _invokeContentOrigin implementation
* Mecab test (#1361)toasted-nutbread2021-02-08
| | | | | | | * Update Mecab API * Add testMecab API function * Add a test button for the Mecab component
* Mecab refactor (#1357)toasted-nutbread2021-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use private variables * Use local variables * Remove onError * Use private functions * Move results parsing * Set up disconnect observation * Add _clearPort * Update API * Rename * Fix iterator * Update parseText invocation * Update parseText format * Reorganize * Update implementation and docs * Fix some port setup issues
* Remove unused api functions (#1354)toasted-nutbread2021-02-08
| | | | | | | * Remove screenshotGet * Remove downloadDefinitionAudio * Remove clipboardGetImage
* Fix null not being handled properly in _findTab result (#1331)toasted-nutbread2021-01-30
|
* Add note errors (#1329)toasted-nutbread2021-01-30
| | | | | | | | | | | | | | | | | | | * Update _addAnkiNote to track errors * Change comparison * Update anki note adding to show errors * Fix template * Show errors when Anki card creation behaves unexpectedly * Update some errors related to anki media injection * Update addAnkiNote error handling * Improve Anki errors * Simplify error messages related to template rendering
* Update clipboard options organization (#1318)toasted-nutbread2021-01-26
| | | | | | | | | | | * Update options organization * Update general.enableClipboardPopups to clipboard.enableBackgroundMonitor * Update general.enableClipboardMonitor to clipboard.enableSearchPageMonitor * Update general.maximumClipboardSearchLength to clipboard.maximumSearchLength * Update general.autoSearchClipboardContent to clipboard.autoSearchContent
* Update badges (#1309)toasted-nutbread2021-01-24
| | | | | | | * Update badge indications to be based off current profile * Update warning badge to display when no dictionaries are enabled * Show how many dictionaries are enabled
* Multiple custom audio sources (#1303)toasted-nutbread2021-01-23
| | | | | | | | | | | | | | | * Fix label * Fix icon size being flexible * Add schema * Add customSourceType option * Update settings * Pass customSourceType to the audio downloader * Implement custom audio JSON mode
* 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
* Backend options update (#1274)toasted-nutbread2021-01-18
| | | | | | | * Update how _onCommandToggleTextScanning changes settings * Make getFullOptions/getOptions private * Remove unused isPrepared
* Command refactor (#1271)toasted-nutbread2021-01-18
| | | | | * Change selectors * Change openHelpPage to openInfoPage
* Update extension shortcuts (#1246)toasted-nutbread2021-01-16
| | | | | * Update commands * Add command to open the popup window
* Popup window options (#1245)toasted-nutbread2021-01-16
| | | | | | | | | | | | | | | * Add popupWindow options * Add toBoolean converter * Add settings * Use new options * Add test link * Fix window state not working * Make the window section advanced only
* 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
* Translator regex replacements (#1199)toasted-nutbread2021-01-03
| | | | | | | | | | | | | | | | | | | * Add support for regex replacements during the translation process * Allow assignment of textReplacements * Rename * Set up test data * Write expected data * Set up options * Prevent infinite loop if regex matches empty string * Implement setting controller * Add support for testing pattern replacements
* Update copyright year (#1194)toasted-nutbread2021-01-01
| | | | | * Update copyright year * Remove redundant Author info
* Add support for using declarativeNetRequest (#1127)toasted-nutbread2020-12-18
|
* Set up initial manifest v3 support (#605)toasted-nutbread2020-12-18
|
* Maximum clipboard search length (#1118)toasted-nutbread2020-12-18
| | | | | | | | | * Add maximumClipboardSearchLength an option * Add setting * Add limits * Update tests
* Refactor tab creation to improve errors (#1110)toasted-nutbread2020-12-13
|
* Updated welcome page (#1107)toasted-nutbread2020-12-13
| | | | | | | | | | | | | | | * Make storage controller optional * Make more elements optional * Update styles * Create new welcome page * Update URL for welcome guide * Remove old guide * Fix unused global
* 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
* Settings v2 testing setup (#1084)toasted-nutbread2020-12-06
| | | | | | | | | * Add option for using settings v2 * Add options/info about settings v2 * Use settings v2 URL when applicable * Update tests
* JapaneseUtil normalization (#1076)toasted-nutbread2020-11-29
| | | | | * Use JapaneseUtil as a class which is manually instantiated * Use alias function for toKana
* Fix kanji note creation (#1069)toasted-nutbread2020-11-26
| | | | | | | * Fix kanji note creation * Move try/catch for consistency * Move audio normalization
* Compact tags refactor (#1021)toasted-nutbread2020-11-12
| | | | | | | | | | | | | * Update translator to flag redundant tags instead of remove * Update how compact tags are shown in the popup * Pass compactTags option to note builder * Update options templates * Add options upgrade * Add options upgrade test
* Remove unused functions from backend.js (#1014)toasted-nutbread2020-11-08
|
* 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
* Fix search tab opening having some errors (#1004)toasted-nutbread2020-11-07
|
* Move deinflection reasons setup to backend (#880)toasted-nutbread2020-10-04
| | | | | * Move deinflection reasons setup to backend * Remove async
* Translator options refactor (#879)toasted-nutbread2020-10-04
| | | | | | | | | | | | | * Refactor internal options for findTerms to not use the settings object * Move findTerms/findKanji options creation * Deconstruct used options values to variables before any await calls * Rename findTermsOptions to just options * Add documentation comments * Add type information about definitions
* Send message updates (#864)toasted-nutbread2020-09-26
| | | | | | | | | | | | | | | * Use _sendMessageTab * Move _sendMessageAllTabs next to _sendMessageTab * Rename function * Add and use _sendMessageTabIgnoreResponse * Add and use _sendMessageIgnoreResponse * Always include params * Update function consistency
* Add clipboard-text Anki field (#863)toasted-nutbread2020-09-26
| | | | | | | * Add clipboard-text anki field * Add markers * Update clipboard injection
* Media utility refactor (#859)toasted-nutbread2020-09-26
| | | | | | | | | | | * Move loadImageBase64 into DictionaryImporter * Convert mediaUtility to a class * Add getFileExtensionFromImageMediaType to MediaUtility * Use MediaUtility instead of _getImageExtensionFromMediaType * Use MediaUtility in ClipboardReader to validate images before reading
* 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
* ClipboardReader class (#854)toasted-nutbread2020-09-20
| | | | | | | | | | | * Create ClipboardReader class * Use ClipboardReader in Backend * Update ClipboardMonitor to use ClipboardReader * Replace _onApiClipboardImageGet call * Assign clipboard reader browser