Allow passing startup props to setupCardInfo()
Add-ons that use it and don't want the revlog can pass in includeRevlog:false
Issue noticed while addressing https://forums.ankiweb.net/t/card-info-during-review/86/12
in c86da082b4
This commit is contained in:
parent
27eff12235
commit
a0e403c3dd
@ -11,11 +11,14 @@ const i18n = setupI18n({
|
|||||||
modules: [ModuleName.CARD_STATS, ModuleName.SCHEDULING, ModuleName.STATISTICS],
|
modules: [ModuleName.CARD_STATS, ModuleName.SCHEDULING, ModuleName.STATISTICS],
|
||||||
});
|
});
|
||||||
|
|
||||||
export async function setupCardInfo(target: HTMLElement): Promise<CardInfo> {
|
export async function setupCardInfo(
|
||||||
|
target: HTMLElement,
|
||||||
|
props = {},
|
||||||
|
): Promise<CardInfo> {
|
||||||
checkNightMode();
|
checkNightMode();
|
||||||
await i18n;
|
await i18n;
|
||||||
|
|
||||||
return new CardInfo({ target, props: {} });
|
return new CardInfo({ target, props });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.location.hash.startsWith("#test")) {
|
if (window.location.hash.startsWith("#test")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user