diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2022-05-30 12:03:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-30 12:03:24 -0400 |
commit | 19bba07a8bccb51a9db85c13fd921d825defe753 (patch) | |
tree | 4354e2d3396f5957a005256a85f60d239ab30c0d /ext/js/background/backend.js | |
parent | 0b5d54e7c66c17383e23855a1c3d4dbb1ea817fc (diff) |
Add support for Anki API key (#2169)
* Update material.css to support password fields
* Support password
* Add "apiKey" setting
* Use apiKey
* Update options if API key changes
* Update tests
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r-- | ext/js/background/backend.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index 07d6fd98..75ff7bee 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -998,8 +998,11 @@ class Backend { const enabled = options.general.enable; + let {apiKey} = options.anki; + if (apiKey === '') { apiKey = null; } this._anki.server = options.anki.server; this._anki.enabled = options.anki.enable && enabled; + this._anki.apiKey = apiKey; this._mecab.setEnabled(options.parsing.enableMecabParser && enabled); |