2020-09-19 01:16:39 +00:00
|
|
|
/*
|
2021-01-01 19:50:41 +00:00
|
|
|
* Copyright (C) 2020-2021 Yomichan Authors
|
2020-09-19 01:16:39 +00:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* globals
|
2021-01-13 03:47:07 +00:00
|
|
|
* AnkiNoteData
|
2020-11-29 18:09:02 +00:00
|
|
|
* JapaneseUtil
|
2020-09-19 01:16:39 +00:00
|
|
|
* TemplateRenderer
|
|
|
|
* TemplateRendererFrameApi
|
|
|
|
*/
|
|
|
|
|
|
|
|
(() => {
|
2020-11-29 18:09:02 +00:00
|
|
|
const japaneseUtil = new JapaneseUtil(null);
|
|
|
|
const templateRenderer = new TemplateRenderer(japaneseUtil);
|
2021-01-11 00:28:50 +00:00
|
|
|
templateRenderer.registerDataType('ankiNote', {
|
2021-01-13 03:47:07 +00:00
|
|
|
modifier: ({data, marker}) => new AnkiNoteData(data, marker).createPublic()
|
2021-01-11 00:28:50 +00:00
|
|
|
});
|
2020-09-19 01:16:39 +00:00
|
|
|
const api = new TemplateRendererFrameApi(templateRenderer);
|
|
|
|
api.prepare();
|
|
|
|
})();
|