From a78eed2ce4234cf525f1317721f38b1458b05304 Mon Sep 17 00:00:00 2001 From: dchen5022 Date: Sat, 21 Dec 2024 11:08:21 -0500 Subject: [PATCH] Add empty string to field if url starts with chrome-extension or moz-extension --- ext/js/data/anki-note-builder.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ext/js/data/anki-note-builder.js b/ext/js/data/anki-note-builder.js index ccf7c225ed..c98de258c5 100644 --- a/ext/js/data/anki-note-builder.js +++ b/ext/js/data/anki-note-builder.js @@ -97,6 +97,17 @@ export class AnkiNoteBuilder { const fieldName = fields[i][0]; const {value, errors: fieldErrors, requirements: fieldRequirements} = formattedFieldValues[i]; noteFields[fieldName] = value; + + // Make field blank if URL if starts with chrome-extension or moz-extension + const internalFieldName = fields[i][1]; + if (internalFieldName === '{url}') { + const urlPrefix = '