Commit Graph

102 Commits

Author SHA1 Message Date
toasted-nutbread
1256e4bab7 Update version 2022-04-04 19:17:43 -04:00
toasted-nutbread
f61690ea2c
Theme updates (#2105)
* Change siteColor to siteTheme

* Fix potential null exception

* Simplify

* Update display theme assignment

* Add a data-browser-theme attribute

* Add "browser" option for theme

* Create ThemeController

* Add theme-controller.js to relevant pages

* Use ThemeController

* Simplify

* Fix 'light' being used instead of 'default'

* Update the settings values to more accurately reflect their usage

* Change default site theme in display.js

* Remove async

* Restore async for consistency
2022-04-03 16:20:55 -04:00
toasted-nutbread
7a2ab86609
Structured content links (#2089)
* Update CSS to JSON converter to generalize the remove-property comment

* Fix navigation not being updated when _clearContent is run

* Add structured content schema for link tags

* Add test links

* Add external-link icon

* Pass Display instance to DisplayContentManager

* Update structured content generation

* Update link styles
2022-03-17 19:01:59 -04:00
toasted-nutbread
d48ea4dece Update version 2022-02-02 20:44:08 -05:00
toasted-nutbread
89ac85afd0
Update copyright date (#2062)
* Update eslint settings

* Update 2021 files

* Update other files
2022-02-02 20:43:10 -05:00
toasted-nutbread
f2102ade4c
Add AccessibilityController class, which dynamically registers (#2024)
and unregisters the google-docs.js content script
2021-11-23 22:23:14 -05:00
toasted-nutbread
d454b52a18
Google Docs accessibility refactor (#2023)
* 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
2021-11-23 22:08:30 -05:00
toasted-nutbread
ecc994a8bb
ScriptManager updates (#2022)
* 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
2021-11-23 16:16:13 -05:00
toasted-nutbread
c1a51ae41f Update version 2021-10-31 21:47:00 -04:00
toasted-nutbread
d14268eb57 Update version 2021-09-30 21:13:12 -04:00
toasted-nutbread
247c929bba
Update document-start.js to only run for docs.google.com (#1964)
* Update document-start.js to only run for docs.google.com

* Update manifest
2021-09-26 18:23:57 -04:00
toasted-nutbread
9b86b5a56e
Update dictionary validation script (#1937) 2021-09-08 14:36:46 -04:00
toasted-nutbread
0331374241
Dictionary media import improvements (#1926)
* 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
2021-09-03 22:33:58 -04:00
toasted-nutbread
764d59df13 Update version 2021-08-31 21:49:57 -04:00
toasted-nutbread
5d4141a429
Google Docs accessibility (#1875)
* 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
2021-08-07 12:40:51 -04:00
toasted-nutbread
b0df8045f6 Update version 2021-07-31 19:24:02 -04:00
toasted-nutbread
01c5c5c04b
Dictionary importer refactoring (#1867)
* Remove map of schemas

* Don't reuse dictionary importer instances

* Refactor

* Update how progress callback is used
2021-07-31 18:08:51 -04:00
toasted-nutbread
00c5ae7983
DictionaryImporterMediaLoader (#1860)
* Rename param for consistency

* Move media loading functionality into DictionaryImporterMediaLoader

* Create test class for media loading

* Remove unnecessary Blob/Image/URL functionality
2021-07-31 12:30:31 -04:00
toasted-nutbread
2d57d69b9e
Improve dictionary importer (#1859)
* Optimize dictionary data parsing during import

* Use ArrayBuffer instead of string

* Add missing function for testing
2021-07-31 10:53:35 -04:00
toasted-nutbread
10a9da4d31
Anki template renderer abstraction (#1839)
* Add AnkiTemplateRenderer abstraction

* Move Anki-specific template functionality into AnkiTemplateRenderer

* Add documentation comments
2021-07-18 11:20:03 -04:00
toasted-nutbread
e1230c7934
CSS JSON styles generalization (#1838)
* Rename files

* Generalize custom CSS generation and testing

* Add CSS JSON file for display pronunciation
2021-07-17 22:39:25 -04:00
toasted-nutbread
fafa746a63
Sandbox script folders (#1837)
* Move scripts

* Update paths

* Fix ordering

* Simplify eslint rules
2021-07-17 17:10:25 -04:00
toasted-nutbread
74381302c7
Add generalized css-to-json-util dev module (#1836) 2021-07-17 16:03:26 -04:00
toasted-nutbread
e88d63fc6d
Template renderer media updates (#1802)
* Add TemplateRendererMediaProvider to abstract media-related functionality

* Update representation of injected media

* Update templates

* Update upgrade file

* Update tests

* Update test data

* Force media to be an object

* Update test data
2021-07-06 19:43:53 -04:00
toasted-nutbread
ca97e38bd2
Anki support for structured-content (#1786)
* Update how glossary text is formatted

* Update structured content and image generation

* Pass root data to _createStructuredContentGenerator

* Implement media URLs

* Update documentation

* Update options util

* Apply styles to content

* Improve HTML normalization

* Update DatabaseVM.fetch function

* Update test

* Update test data
2021-07-02 22:46:38 -04:00
toasted-nutbread
a4715935cb
More CssStyleApplier updates (#1785)
* Update eslint rules for css-style-applier.js

* Don't use chrome.runtime.getURL

* Update CSP to allow inline styles
2021-07-02 22:12:02 -04:00
toasted-nutbread
0c00c56e39
Add a script to patch bugs in dependencies (#1783) 2021-07-02 16:59:36 -04:00
toasted-nutbread
9c8f32d53f Update version 2021-06-30 20:43:39 -04:00
toasted-nutbread
deb2a742ed
Update dictionary image link color (#1778) 2021-06-28 22:19:55 -04:00
toasted-nutbread
002da9fba8
Structured content style json (#1771)
* Install css

* Remove unnecessary rule

* Create CSS overrides file

* Create script to generate CSS JSON file

* Generate JSON

* Add test
2021-06-27 17:57:00 -04:00
toasted-nutbread
73caeac0fb
Test updates (#1763)
* Allow passing of globals to custom VMs

* Add _serializeError

* Expose document to VM
2021-06-26 17:05:59 -04:00
toasted-nutbread
057283245e
Add support for definitionless main dictionary (#1729) 2021-06-05 13:35:23 -04:00
toasted-nutbread
97d0a158d0 Update version 2021-05-31 22:25:05 -04:00
toasted-nutbread
744f9bb836 Revert "Auto update manifest version (#1724)"
This reverts commit e637408b4a.
2021-05-31 22:24:17 -04:00
toasted-nutbread
e637408b4a
Auto update manifest version (#1724)
* Update manifest to auto-fill the version based on most recent git tag

* Install git in the CI pipeline
2021-05-31 14:20:40 -04:00
toasted-nutbread
983cdd2339
Improve error message when running manifest commands (#1723) 2021-05-31 14:20:35 -04:00
toasted-nutbread
003cf791b1
Update build script (#1722)
* Add support for making non-buildable variants

* Add support for running a command to assign a value

* Update chrome-dev inheritance

* Add base variant

* Update manifest to auto-fill the version based on most recent git tag

* Add support for changing the default manifest

* Change the default manifest

* Move some manifest utility functions into manifest-util.js

* Move more manifest functionality into ManifestUtil

* Revert "Update manifest to auto-fill the version based on most recent git tag"

This reverts commit 2a66e40ff24f9dc545783503bcf3404f21148356.
2021-05-31 13:24:40 -04:00
toasted-nutbread
d16739a83a
Json schema validation improvements (#1697)
* Create new JsonSchema class

* Add proxy handler

* Update tests

* Update validation scripts

* Update backend

* Update audio downloader

* Update options util

* Update dictionary importer

* Update json schema file reference

* Remove old json-schema.js

* Rename new json-schema.js

* Update file names

* Rename class
2021-05-22 15:45:20 -04:00
toasted-nutbread
b48052ff32
Add timing information to schema-validate.js (#1696) 2021-05-22 15:19:56 -04:00
toasted-nutbread
c95827ae68
Add timing information to dictionary-validate.js (#1694) 2021-05-22 14:50:52 -04:00
toasted-nutbread
76276e78da
Expose search query to anki template renderer (#1686)
* Expose query and fullQuery to Anki context

* Add {search-query} marker

* Update test data

* Update tests

* Wrap search query in multiLine
2021-05-17 20:18:37 -04:00
210f633dcc Update version 2021-05-08 21:14:54 -07:00
toasted-nutbread
919c59a776 Update version 2021-04-30 18:23:40 -04:00
toasted-nutbread
e14b52ef84
Update dictionary entry terminology (#1592)
* Update terminology

* Update terminology in display.js

* Update terminology in display-audio.js

* Update terminology in text-scanner.js

* Update terminology in backend.js

* Update terminology in mecab.js

* Update terminology in audio-downloader.js

* Update terminology in translator-vm.js

* Update terminology in dictionary-data-util.js

* Update terminology in dictionary-database.js

* Update terminology in japanese-util.js

* Change/upgrade {expression} to {term}

* Update terminology in test-japanese.js

* Update terminology in test-database.js

* Update terminology in anki-templates-controller.js

* Update terminology in anki-note-builder.js

* Update terminology in backend.js

* Update terminology in text-scanner.js

* Update terminology in display.js

* Update terminology in display.js
2021-04-04 16:22:35 -04:00
toasted-nutbread
28fa3fa795
Move test VM crypto definition (#1584) 2021-04-02 12:43:37 -04:00
toasted-nutbread
36b7e34cce Update version 2021-04-01 19:17:53 -04:00
toasted-nutbread
4be5c8fd9f
Refactor Translator and dictionary entry format (#1553)
* Update test data

* Move translator.js

* Create new version of Translator

* Update Backend

* Update DictionaryDataUtil

* Update DisplayGenerator

* Create AnkiNoteDataCreator

* Replace AnkiNoteData with AnkiNoteDataCreator

* Update tests

* Remove AnkiNoteData

* Update test data

* Remove translator-old.js

* Add TypeScript interface definitions for the new translator data format
2021-03-25 19:55:31 -04:00
toasted-nutbread
7a8d359aa2
TranslatorVM (#1548)
* Add TranslatorVM

* Update test-translator.js
2021-03-22 22:54:24 -04:00
toasted-nutbread
07df1e0117
Fix dictionary image support (#1526)
* Fix content security policy for images

* Add createBlobFromBase64Content to MediaUtil

* Update MediaLoader to use MediaUtil

* Use blob URLs when importing dictionaries

* Update VM's URL to support createObjectURL and revokeObjectURL

* Fix test
2021-03-14 18:41:15 -04:00
toasted-nutbread
488dc486f1 Update version 2021-02-28 18:28:50 -05:00