summaryrefslogtreecommitdiff
path: root/ext/js/background
Commit message (Collapse)AuthorAge
* Remove unneeded referencestoasted-nutbread2023-11-27
|
* Add JSDoc type annotations to project (rebased)toasted-nutbread2023-11-27
|
* Fix text replacements offscreenjbukl2023-11-17
|
* whitespacepraschke2023-11-12
|
* separate offscreen proxies from backend.jspraschke2023-11-12
|
* Merge branch 'master' into offscreen-dbDarius Jahandarie2023-11-12
|\
| * `yomichan` -> `yomitan`starxeras2023-11-10
| |
* | Move dictionary db to offscreenjbukl2023-11-11
|/
* Modernize codebaseDarius Jahandarie2023-11-04
| | | | | | - Use ES modules - Remove vendored libs and build them from npm using esbuild - Switch from JSZip to zip.js
* remove webRequest and webRequestBlockingpraschke2023-10-29
| | | | | | | | | | | | | | | | firefox was previously unable to use declarativeNetRequest, as some browser state (ExtensionDNRStore) wasn't correctly initialized wrt yomitan's use of the DNR API. this bug manifested as an unexpected error on calls to updateDynamicRules(), specifically after the browser has been restarted. switching to the use of session rules instead of dynamic rules fixes this bug. i have tested audio info requests (custom JSON, JPod Alternate, Jisho) that exhibited the bug after browser restart on version 115 and 118, and the audio plays instead of the request failing. webRequest can now be entirely removed.
* fix: session rules should be used instead of dynamic rulespraschke2023-10-29
| | | | | | session rules are less persistent than dynamic rules, and the intention of RequestBuilder is to only have rules active for the lifetime of specific requests.
* fix: _getDynamicRules() returns a promisepraschke2023-10-29
| | | | dynamic rules were never cleared, as the promise is not iterable as expected.
* remove webRequest from chrome for realpraschke2023-10-29
|
* Merge pull request #276 from praschke/block-helper-rewriteDarius Jahandarie2023-10-22
|\ | | | | | | Block helper rewrite
| * warn about custom templates in the welcome pagepraschke2023-10-22
| |
* | 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
|