Simplify ankiGetFieldMarkersHtml
This commit is contained in:
parent
5339381c30
commit
774db569eb
@ -178,11 +178,9 @@ function ankiFieldsToDict(elements) {
|
||||
}
|
||||
|
||||
|
||||
function ankiGetFieldMarkersHtml(markers, fragment) {
|
||||
function ankiGetFieldMarkersHtml(markers) {
|
||||
const template = document.querySelector('#anki-field-marker-template').content;
|
||||
if (!fragment) {
|
||||
fragment = new DocumentFragment();
|
||||
}
|
||||
const fragment = document.createDocumentFragment();
|
||||
for (const marker of markers) {
|
||||
const markerNode = document.importNode(template, true).firstChild;
|
||||
markerNode.querySelector('.marker-link').textContent = marker;
|
||||
|
Loading…
Reference in New Issue
Block a user