From 19bba07a8bccb51a9db85c13fd921d825defe753 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 30 May 2022 12:03:24 -0400 Subject: 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 --- ext/js/background/backend.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/js/background/backend.js') 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); -- cgit v1.2.3