aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/anki-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/pages/settings/anki-controller.js')
-rw-r--r--ext/js/pages/settings/anki-controller.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/ext/js/pages/settings/anki-controller.js b/ext/js/pages/settings/anki-controller.js
index 26cab68f..509e263c 100644
--- a/ext/js/pages/settings/anki-controller.js
+++ b/ext/js/pages/settings/anki-controller.js
@@ -17,7 +17,7 @@
/* global
* AnkiConnect
- * AnkiNoteBuilder
+ * AnkiUtil
* ObjectPropertyAccessor
* SelectorObserver
*/
@@ -26,7 +26,6 @@ class AnkiController {
constructor(settingsController) {
this._settingsController = settingsController;
this._ankiConnect = new AnkiConnect();
- this._ankiNoteBuilder = new AnkiNoteBuilder(false);
this._selectorObserver = new SelectorObserver({
selector: '.anki-card',
ignoreSelector: null,
@@ -156,10 +155,6 @@ class AnkiController {
return this._settingsController.permissionsUtil.getRequiredPermissionsForAnkiFieldValue(fieldValue);
}
- containsAnyMarker(field) {
- return this._ankiNoteBuilder.containsAnyMarker(field);
- }
-
// Private
async _onOptionsChanged({options: {anki}}) {
@@ -439,7 +434,7 @@ class AnkiCardController {
_validateField(node, index) {
let valid = (node.dataset.hasPermissions !== 'false');
- if (valid && index === 0 && !this._ankiController.containsAnyMarker(node.value)) {
+ if (valid && index === 0 && !AnkiUtil.stringContainsAnyFieldMarker(node.value)) {
valid = false;
}
node.dataset.invalid = `${!valid}`;