aboutsummaryrefslogtreecommitdiff
path: root/ext/js/background
Commit message (Collapse)AuthorAge
* fix: clipboard getImage, review commentsjbukl2023-10-21
| | | | | | | implement getImage for offscreen requests move offscreen files, offscreen prep is done in sw prep update permissions document for offscreen rearrange permissions
* chore: some returns booljbukl2023-10-20
|
* chore: cleanup offscreen documentation codejbukl2023-10-20
|
* fix: chromium clipboard accessjbukl2023-10-20
| | | | on chromium, backend calls to clipboardGet are forwarded to an offscreen script
* fix: typoCashew2023-10-08
|
* remove stray debugging commentpraschke2023-10-01
|
* create both cross-frame ports in the backgroundpraschke2023-09-30
| | | | | | | | | | on Chrome (currently 117), the port created in the content script with runtime.connect does not properly receive an onDisconnect event when the service worker sleeps. the port created in the background with tabs.connect does receive the event, so create both ports with tabs.connect. fixes #241.
* remove broken fetch(1, 2)praschke2023-08-17
| | | | | | | | this line serves no purpose. the commit it was introduced in has the message 'Document RequestBuilder' and is the only non-documentary line in the commit. related to #204.
* fix: StyleOrigin enum absent in Firefoxpraschke2023-08-17
| | | | | the API accepts string literals, which is all this enum provides. This should fix two warnings in #96.
* fix script and style injection in Firefoxpraschke2023-08-17
| | | | | | | | | | | | Firefox added the scripting API in 102. This should fix the majority of warnings listed in #96: - insertCSS - executeScript - getRegisteredContentScripts - contentScripts.register - registerContentScripts - unregisterContentScripts
* refactor: added Firefox/Chrome comment on welcome page, removed console.logAustin Siew2023-04-02
|
* refactor: fixed linting errorsAustin Siew2023-04-02
|
* fix: welcome page no longer loads multiple timesAustin Siew2023-04-02
|
* fix: renamed action -> browserAction, to support manifest v3Austin Siew2023-03-23
|
* fixed eslint, changed header to only use 2 spaces, added missing headers to testAustin Siew2023-03-22
|
* Updated LICENSE to full license, added Yomitan 2023 to all license headersAustin Siew2023-03-21
|
* Documentation updates (#2257)toasted-nutbread2022-10-16
| | | | | | | * Document Backend * Document RequestBuilder * Document some of AnkiConnect
* Clipboard updates (#2254)toasted-nutbread2022-10-15
| | | | | | | | | | | | | | | | | | | * Rename * Rename vars * Refactor paste target * Prevent most CSS url() properties from loading * Add helper function to clear rich function * Add useRichText argument * Update condition for using readText * Fix indent * Update CSS
* Audio certificate error notification (#2243)toasted-nutbread2022-10-05
| | | | | * Refactor error throwing and change ID * Show a notification when an audio download fails due to an expired cert
* API loadExtensionScripts (#2233)toasted-nutbread2022-09-24
| | | | | * Inject MV3 scripts immediately * Add api.loadExtensionScripts
* ArrayBufferUtil (#2215)toasted-nutbread2022-08-20
| | | | | | | * Rename StringUtil to ArrayBufferUtil * Update docs * Rename file string-util.js to array-buffer-util.js
* Audio download timeout (#2187)toasted-nutbread2022-08-20
| | | | | | | | | | | | | | | | | | | | | | | * Add support for an idle timeout when downloading audio * Update eslint rules * Pass idleTimeout to the downloader from DisplayAnki * Add anki.downloadTimeout setting * Update tests * Assign _audioDownloadIdleTimeout using settings * Show info about cancelled downloads * Handle Firefox bug * Improve audio errors * Refactor * Move functions to RequestBuilder
* Add support for Anki API key (#2169)toasted-nutbread2022-05-30
| | | | | | | | | | | | | * Update material.css to support password fields * Support password * Add "apiKey" setting * Use apiKey * Update options if API key changes * Update tests
* Add support for guiEditNote to view notes (#2143)toasted-nutbread2022-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add AnkiConnect.guiEditNote * Update _onApiNoteView to first try guiEditNote * Add setting * Update noteView API * Use setting * Return which mode was used * Update DisplayGenerator * Handle errors in DisplayAnki * Update docs * Add isErrorUnsupportedAction function * Add an allowFallback option to noteView * Disambiguate * Simplify now that preferredMode isn't used * Update settings info * Implement test buttons * Update styles * Update status visibility * Wrap layout * Update description * Update date
* Update referenceUrl to include fragment (#2164)toasted-nutbread2022-05-29
|
* Add an issues page with information about some errors (#2163)toasted-nutbread2022-05-28
|
* HTML page script refactoring (#2162)toasted-nutbread2022-05-28
| | | | | | | * Move some common functionality * Move setupEnvironmentInfo into ExtensionContentController * Move background/environment.js to extension/environment.js
* Audio request errors (#2161)toasted-nutbread2022-05-28
| | | | | | | | | | | | | | | | | | | | | * Generalize _onBeforeSendHeadersAddListener * Simplify filter assignment * Use requestId rather than done * Properly support Firefox addListener without arguments * Add details to fetchAnonymous errors * Refactor * Enable support for no header modifications * Update MV3 support for error details * Expose errors in downloadTermAudio * Throw an error if audio download fails due to potential permissions reasons
* Anki findNotes (#2152)toasted-nutbread2022-05-21
| | | | | * Add findNotes API * Add api.findAnkiNotes
* ESlint JSdoc (#2148)toasted-nutbread2022-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Install eslint-plugin-jsdoc * Initial rules setup * Update lists * Use @returns rather than @return * Remove error throwing code which is never executed * Fix issues relating to @throws * General error fixes * Update Display type documentation * Various doc fixes * Fix invalid tuple syntax * Doc updates * Remove unused * Doc updates * Enable jsdoc/require-returns * Update rules * Update remaining rules
* Add mode documentation about the types used by Translator (#2147)toasted-nutbread2022-05-19
|
* Improve Anki storeMediaFile (#2084)toasted-nutbread2022-03-13
| | | | | * Use the return value of storeMediaFile * Update documentation
* Update copyright date (#2062)toasted-nutbread2022-02-02
| | | | | | | * Update eslint settings * Update 2021 files * Update other files
* matchType/deinflect distinction (#2040)toasted-nutbread2021-12-17
| | | | | | | * Pass a "deinflect" option to findTerms * Update Translator to use deinflect option * Fix test input options
* Replace 'wildcard' parameter with 'matchType' (#2038)toasted-nutbread2021-12-17
|
* Add AccessibilityController class, which dynamically registers (#2024)toasted-nutbread2021-11-23
| | | and unregisters the google-docs.js content script
* Google Docs accessibility refactor (#2023)toasted-nutbread2021-11-23
| | | | | | | | | | | | | | | | | * Skip urlRegex if it's used as a filter * Add getRequiredContentScriptRegistrationPermissions function * Add a reentrant check to google-docs.js * Remove script node * Move forceGoogleDocsHtmlRendering check into google-docs.js * Replace document-start.js usage with google-docs.js * Remove documentStart handling * Add missing parameter descriptions
* ScriptManager updates (#2022)toasted-nutbread2021-11-23
| | | | | | | | | | | * Fix spacing * Add more parameters to injectStylesheet * Add more parameters to injectScript * Update ScriptManager to support content script registration * Add webNavigation as an optional permission
* ScriptManager (#2021)toasted-nutbread2021-11-22
| | | | | * Create ScriptManager class * Use ScriptManager in Backend
* Action handler name disambiguation (#2018)toasted-nutbread2021-11-21
| | | | | | | | | | | | | | | | | | | * Disambiguate PopupFactory action handlers * Update HotkeyHandler action names * Disambiguate Frontend action handlers * Disambiguate Display action handlers * Disambiguate PopupPreviewFrame action handlers * Disambiguate Yomichan action handlers * Disambiguate Frontend action handlers * Disambiguate Display action handlers * Disambiguate SearchDisplayController action handlers
* Disable background clipboard monitor, mecab, and anki if disabled (#1977)toasted-nutbread2021-10-03
|
* Frequency dictionary sort (#1938)toasted-nutbread2021-09-26
| | | | | | | | | | | | | | | | | * Add sortDictionary/sortDictionaryOrder options * Update options * Add API.getTermFrequencies * Add settings * Implement frequency dictionary sorting * Update test * Update test data * Fix handling of undefined rank-based frequencies
* Rename _onDocumentStart => _onApiDocumentStart for consistency (#1939)toasted-nutbread2021-09-08
|
* Dictionary media import improvements (#1926)toasted-nutbread2021-09-03
| | | | | | | | | | | | | | | | | | | * Add base64ToArrayBuffer to StringUtil * Remove unnecessary media-util.js import * Run async requirements in serial rather than parallel * Update API.getMedia handler to convert ArrayBuffer content to base64 * Rename getImageResolution to getImageDetails * Change parameter order of getImageDetails * Pre-process and store media as an ArrayBuffer * Remove MediaUtil.createBlobFromBase64Content * Fix Anki media injection
* Dictionary worker updates (#1914)toasted-nutbread2021-08-28
| | | | | | | * Add support for running getDictionaryCounts via DictionaryWorker * Run dictionary integrity checks on a separate thread * Remove api.getDictionaryCounts
* Add support for manifest V3 script injection (#1878)toasted-nutbread2021-08-07
|
* Google Docs accessibility (#1875)toasted-nutbread2021-08-07
| | | | | | | | | | | | | * Add accessibility option for forcing Google Docs HTML-based rendering * Update settings * Send a documentStart message at document start * Add accessibility script for Google Docs * Set up accessibility * Update tests
* Throw an error when _getProfile doesn't have a matching profile (#1826)toasted-nutbread2021-07-13
|
* JapaneseUtil updates (#1813)toasted-nutbread2021-07-09
| | | | | | | | | * Rename test file * Use shorthand * Add support checking functions * Remove convertReading from JapaneseUtil
* Text parse updates (#1811)toasted-nutbread2021-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Expose more settings to QueryParser * Rename textParse to parseText * Refactor * Convert reading inside QueryParser rather than Backend * Remove use of readingMode from backend * Rename * Update parseText args * Simplify * Update results * Move use of optionsContext * Run mecab and internal parser in parallel * Added "dictionary-reading" reading mode * Update romaji conversion case