aboutsummaryrefslogtreecommitdiff
path: root/ext/js
Commit message (Collapse)AuthorAge
* wait for backend ready signal to prepare cross-frame apipraschke2023-10-01
| | | | | not sure if API messages should be sent in prepare(), but we should probably wait for the ready signal before doing so
* remove stray debugging commentpraschke2023-10-01
|
* remove yomichan.connect()praschke2023-10-01
| | | | | | it was only used in the cross-frame api. additionally, this comment on triggerExtensionUnloaded is incorrect.
* 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.
* Add Intuitive Permission Toggle to Welcome Page (#214)Ewan Fox2023-08-20
|
* 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: window.getSelection() can return null on Firefoxpraschke2023-08-17
|
* 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
* Add support for exporting and importing dictionaries database.forsakeninfinity2023-07-15
| | | | | | | | It's super annoying to have to import dictionaries one at a time every time you move across browsers or devices. This change adds an experimental mechanism to export and import the entire database of dictionaries so that users have to deal with only one source instead of tracking tens of different dictionaries separately when migrating.
* fix: different duration for Firefox for whatever reasonAustin Siew2023-07-07
|
* Fix lintAustin Siew2023-06-09
|
* Fix Handlebars not working on Firefox due to evalAustin Siew2023-06-09
|
* 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
|
* linked error message to new repoAustin Siew2023-03-25
|
* renamed default tag to yomitan, renamed exported settings to yomitanAustin Siew2023-03-25
|
* Fix Google Docs URL regex to not be excessively wideDarius Jahandarie2023-03-25
|
* fix: renamed action -> browserAction, to support manifest v3Austin Siew2023-03-23
|
* Merge pull request #8 from ctpk/masterDarius Jahandarie2023-03-23
|\ | | | | Apply .aac extension so playback works in downstream Anki clients
| * Set file extension for aac audio media typectpk2023-02-17
| |
* | removed trailing newlinesAustin 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
* Fix text selection not always working properly (#2246)toasted-nutbread2022-10-15
|
* 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
* Cleanup and refactoring (#2239)toasted-nutbread2022-09-27
| | | | | | | | | | | * Remove unused ignoreSelectors * Remove unused isMouseButtonPressed * Update getWritingMode to use the immediate element if possible * Move static functions to DocumentUtil * Fix documentation
* More API documentation (#2238)toasted-nutbread2022-09-26
| | | | | | | | | * Document TextSourceRange * Document TextSourceElement * Document DocumentUtil * Document DocumentFocusController
* Google Docs accessibility simplifications (#2237)toasted-nutbread2022-09-25
| | | | | | | * Use getAttribute instead of dataset, in case SVG node APIs are unusual * Use pointer-events instead of fill * Use elementFromPoint instead of elementsFromPoint
* TextSource* API updates (#2236)toasted-nutbread2022-09-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move TextSourceRange static functions to DocumentUtil getWritingMode is also simplified * Update Google Docs range to be empty to match other range sources * Rename imposterContainer to imposterElement * Add static creation functions * Add static creation function * Remove unused collapse function * Don't select imposter elements * Refactor setEndOffset * Adjust argument order for setEndOffset * Update TextSourceRange constructor * Remove unused isConnected * Cache rects * Fix test * Remove unused getRect * Revert "Fix test" * Remove cachedRect * Use the source element rect to handle scroll differences * Writing mode update * Remove _cachedRects update This shouldn't be necessary as the imposter is usually detached almost immediately after scanning, giving no time for the window to be resized or scrolled.
* Google Docs accessibility update (#2235)toasted-nutbread2022-09-24
| | | | | | | | | | | | | * Update Google Docs injection script * Create GoogleDocsUtil * Update Frontend.js to register GoogleDocsUtil's getRangeFromPoint handler * Update setting name and description * Add comment * Fix Firefox support
* DocumentUtil extensibility (#2234)toasted-nutbread2022-09-24
| | | | | * Update DocumentUtil.getRangeFromPoint to be extensible * Add documentation
* API loadExtensionScripts (#2233)toasted-nutbread2022-09-24
| | | | | * Inject MV3 scripts immediately * Add api.loadExtensionScripts
* DocumentUtil static (#2232)toasted-nutbread2022-09-24
| | | | | | | | | | | | | | | * Make all methods static The two non-static methods are kept for temporary compatibility * Use this instead of class name now that functions are static * Update test * Don't instantiate DocumentUtil * Remove temporary non-static methods * Remove unused global declaration
* Exclude documentElement from zoom calculation (#2227)toasted-nutbread2022-09-20
| | | | | | | | | | | | | | | * Exclude documentElement from zoom calculation * Add an option * Refactor zoom coordinate conversion functions * Convert zoom coordinates for text sources * Rename variable * Convert rect coordinate spaces * Handle shadow DOM
* TextSourceElement surrogate pair support (#2217)toasted-nutbread2022-08-20
| | | | | | | * Update StringUtil * Refactor * Handle UTF-16 surrogate pairs
* New StringUtil (#2216)toasted-nutbread2022-08-20
| | | | | | | * Create new StringUtil * Use StringUtil in DOMTextScanner * Fix order
* ArrayBufferUtil (#2215)toasted-nutbread2022-08-20
| | | | | | | * Rename StringUtil to ArrayBufferUtil * Update docs * Rename file string-util.js to array-buffer-util.js
* Fix setEndOffset (#2214)toasted-nutbread2022-08-20
| | | | | * Add _layoutAwareScan option to TextSourceElement.setEndOffset for parity * Remove default param
* Update DOMTextScanner to support UTF-16 surrogate pairs (#2213)toasted-nutbread2022-08-20
|
* Profile index fixes (#2207)toasted-nutbread2022-08-20
| | | | | | | | | * Update settings controller to consistently initialize * Allow profile index to be reset if an error occurs * Update message handler to be async * Fix error when deleting the current profile
* Optimize AnkiConnect.findNoteIds (#2190)toasted-nutbread2022-08-20
| | | | | | | * Use for loop rather than map * Add _getNoteQuery * Optimize findNoteIds to reduce repeat queries
* Fix invalid default values for popupTheme and popupOuterTheme (#2180)toasted-nutbread2022-08-20
| | | | | * Fix invalid default values for popupTheme and popupOuterTheme * Options update
* CSS zoom handling (#2178)toasted-nutbread2022-08-20
| | | | | * Refactor * Handle CSS zoom when scanning
* 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
* Fix TextSourceElement.getRects (#2177)toasted-nutbread2022-08-20
|
* Add new structured content styling options (#2203)Stephen Kraus2022-08-14
| | | | | | | | | Allow for arbitrary string assignment to the font-size property. https://developer.mozilla.org/en-US/docs/Web/CSS/font-size Add support for the text-align property. https://developer.mozilla.org/en-US/docs/Web/CSS/text-align Co-authored-by: stephenmk <stephenmk@users.noreply.github.com>