Commit Graph

87 Commits

Author SHA1 Message Date
toasted-nutbread
17ebe6a754
Create abstraction class for parsing DOM (#798) 2020-09-10 11:30:01 -04:00
toasted-nutbread
115afb63b9
Add api.clipboardGetImage (#778)
* Rename clipboardPasteTarget to just target

* Remove else block

* Add helper functions

* Defer assignment of clipboard paste target

* Add api.clipboardGetImage
2020-09-06 14:38:03 -04:00
toasted-nutbread
1cc9f4b1a4
Remove old conditions.js references (#769) 2020-09-04 18:12:33 -04:00
toasted-nutbread
d8f488e28c
Settings dictionary import refactor (#759)
* Fix .purge not re-opening the database after deletion failure

* Create DictionaryImportController

* Remove backend dictionary import
2020-09-04 17:54:34 -04:00
toasted-nutbread
8cd5a2f75f
Profile conditions cleanup (#768)
* Remove conditions.js

* Rename profile-conditions2.js to profile-conditions.js
2020-09-04 17:53:29 -04:00
toasted-nutbread
f3dd2270a5
Json schema profile conditions (#758)
* Add clearCache function

* Add upgrade

* Use schema-based profile condition validation

* Update profile conditions settings controller

* Remove unnecessary async

* Remove old

* Remove unused templates
2020-09-04 17:44:00 -04:00
toasted-nutbread
9f8f83508e
Merge dictionary.js functions into Translator class (#726)
* Move dictFieldSplit

* Copy dictionary.js definitions into translator.js

* Convert to member functions

* Refactor names

* Remove dictionary.js

* Rename
2020-08-09 21:04:09 -04:00
toasted-nutbread
486d44f719
Json schema improvements (#722)
* Add support for regex pattern testing

* Add tests

* Separate JsonSchemaProxyHandler statics into JsonSchemaValidator

* Use this instead of JsonSchemaValidator

* Make JsonSchemaValidator non-static

* Use cache map for regex
2020-08-09 14:18:59 -04:00
toasted-nutbread
bdcdf9b1f5
Strip request origin (#710)
* Add web request permissions

* Create fetch wrapper that anonymizes the request

* Fix Firefox not supporting 'extraHeaders' option
2020-08-02 18:58:19 -04:00
toasted-nutbread
b1b33f8beb
Fix fetch requests (#708)
* Revert audio fetching functionality to use XMLHttpRequest

* Replace requestJson

* Replace requestJson

* Replace requestJson

* Replace requestJson and requestText

* Fix tests

* Include support for vulgar word searches

* Remove request.js
2020-08-02 13:30:55 -04:00
toasted-nutbread
838fd211c6
Pitch accent Anki field templates (#701)
* Template helper updates

* Add pitch data to exported field formatting data

* Reuse note data

* Add no-op

* Set up pitch accent templates

* Refactor version update functions

* Implement upgrade process for new Anki templates

* Consistency

* Update README and anki.js to have matching markers
2020-08-01 16:23:33 -04:00
toasted-nutbread
a16a8f53e6
Rename GenericDatabase to Database (#634) 2020-06-28 17:29:16 -04:00
toasted-nutbread
441c23bf3b
Rename Database to DictionaryDatabase (#633) 2020-06-28 17:24:06 -04:00
toasted-nutbread
5bf805755a
Yomichan object separation (#627)
* Move "yomichan" object setup to a separate file

* Update script imports

* Align message handlers

* Rename Yomichan.prepare to Yomichan.ready

* Add new prepare function

* Improve isExtensionUrl
2020-06-28 11:26:43 -04:00
toasted-nutbread
244ab31bb2
Generic database (#600)
* Update test

* Rename db to _db

* Create GenericDatabase class

* Catch prepare error

* Allow database to be purged even if it was not open

* Remove unused functions

* Change static functions to non-static

* Delete and count using the media object store

* Update tests
2020-06-21 16:12:56 -04:00
toasted-nutbread
6562d0c1e5
Template renderer class (#574)
* Convert handlebars.js to a class

* Move/rename function

* Update helper registration

* Rename helper functions

* Limit cache size

* Make render() async

* Rename and move
2020-06-15 20:11:54 -04:00
toasted-nutbread
9767b76553
Use cross frame API (#553)
* Use new CrossFrameAPI for popup proxy communication

* Remove use of old cross-frame communication classes

* Remove use of old cross-frame communication files

* Make the crossFrame object a member of the api object
2020-06-07 21:40:11 -04:00
toasted-nutbread
6dd6af05e1
Update background global object usage (#556)
* Omit global window object for scripts used on the background page

* Validate document exists before using

* Remove dom.js from background.html
2020-05-24 14:01:21 -04:00
siikamiika
d6a3825a38
Modifier key platform names (#519)
* wip

* add environment class

* use Environment class

* use Environment for scanning modifier options

* remove Environment in favor of API

* await promise

* use modifier symbols on macOS

* fix key separator issues

* if else to switch

* simplify variable names
2020-05-09 18:36:00 +03:00
toasted-nutbread
f361139d74
Japanese util refactor (#510)
* Convert mixed japanese.js to utility class

* Copy functions from bg/js/japanese.js into mixed/js/japanese.js

* Remove bg/js/japanese.js

* Make wanakana dependency optional

* Update tests
2020-05-06 19:37:36 -04:00
toasted-nutbread
bb2d9501af
Add apiModifySettings (#501)
* Update getProfile/getProfileFromContext to store this.options in a variable

* Add useSchema parameter to options getter functions

* Add apiModifySettings

* Use apiModifySettings instead of apiOptionsSet

* Remove apiOptionsSet

* Fix incorrect deleteCount check

* Require explicit scope for options

* Throw on invalid scope
2020-05-06 19:32:28 -04:00
toasted-nutbread
4e0fc76fe1
Add Yomichan icon SVG (#478)
* Create Yomichan icon SVG and 32x32 PNG

* Update icons

* Add 32x32 icon definition to HTML pages
2020-04-26 16:56:14 -04:00
toasted-nutbread
3c8eb9eee0 Create background-main.js 2020-04-19 14:26:44 -04:00
toasted-nutbread
8106f4744b Add support for importing and storing media files 2020-04-18 21:31:09 -04:00
toasted-nutbread
3684a479c5
Merge pull request #424 from toasted-nutbread/dictionary-importer
Dictionary importer
2020-04-05 12:52:07 -04:00
toasted-nutbread
9052ab8ebd Move dictionary import functionality into a new class 2020-03-30 20:51:20 -04:00
toasted-nutbread
ae84d13757 Create simplified source map class 2020-03-28 18:17:00 -04:00
toasted-nutbread
77a2cc60e9 Move basic string/character testing functions into a mixed/js/japanese.js 2020-03-21 13:18:34 -04:00
toasted-nutbread
9cd4a52b9e Rename audio.js to audio-uri-builder.js 2020-03-07 21:57:26 -05:00
toasted-nutbread
79eb4bdc16 Remove bg/js/api.js 2020-03-07 21:49:04 -05:00
toasted-nutbread
69cce49b0d Move Anki note generation functionality into a new class 2020-03-07 21:46:59 -05:00
toasted-nutbread
dceaa85309 Rename audio.js to audio-system.js 2020-03-07 21:43:51 -05:00
siikamiika
6c63a17d66 query parser html templates 2020-02-10 21:19:18 +02:00
siikamiika
90a5d79570 use ClipboardMonitor in Backend 2020-02-09 21:51:33 +02:00
toasted-nutbread
165959ef06 Move japanese.js into bg 2020-02-08 20:45:30 -05:00
toasted-nutbread
50e0fbbb66 Use schema to validate options 2019-12-29 12:33:15 -05:00
toasted-nutbread
8b89e99eff Remove contenteditable="true" from textarea 2019-12-22 20:35:26 -05:00
toasted-nutbread
11b94d5a82 Make apiClipboardGet use plaintext
Also clear the value before returning
2019-12-22 20:35:26 -05:00
toasted-nutbread
ec8b805e8f Fix missing API functions being used on the background page 2019-12-20 22:46:20 -05:00
toasted-nutbread
ce51fe7eca Use a single api.js 2019-12-13 23:11:56 -05:00
toasted-nutbread
96aad50340 Create DOM utility file 2019-11-26 18:59:52 -05:00
toasted-nutbread
7e94fca7c7 Rename extension.js to core.js to better reflect its use 2019-11-26 17:29:52 -05:00
siikamiika
41020289ab add mecab support 2019-11-23 17:45:44 +02:00
toasted-nutbread
75883ed885 Remove dexie 2019-11-10 13:01:39 -05:00
toasted-nutbread
7de24dd355 Add favicons 2019-11-02 10:10:03 -04:00
siikamiika
48776145d6 add workaround to Chrome clipboard.readText
For some reason this doesn't work on Firefox, so keep using the new API
for Firefox
2019-10-27 15:46:27 +02:00
toasted-nutbread
1d516b3b24 Implement audio fallbacks 2019-10-10 21:30:38 -04:00
toasted-nutbread
8c4fb28a30 Add support creating profile usage conditions 2019-09-18 19:14:01 -04:00
toasted-nutbread
5c4614f585 Add support for showing recursive popups 2019-09-02 19:31:42 -04:00
toasted-nutbread
a39a1fa9e4 Add support for Edge browser 2019-08-26 21:58:03 -04:00