Files
SubMiner/vendor/hachidori/extension/anki-addon.js
T
sudacode d9fdc7ef6d feat(dictionary): add Hachidori backend support
- Add backend selection, setup gating, Anki integration, and external host support
- Add launcher flags, documentation, packaging, and focused tests
- Open on-demand overlay modals on the first attempt
2026-09-22 00:21:19 -07:00

14 lines
657 B
JavaScript

// Pin the add-on independently so older extensions and vendored copies keep
// downloading the relay they were tested with.
// SPDX-License-Identifier: GPL-3.0-or-later
export const ANKI_ADDON_FILE_NAME = "hachidori-relay.ankiaddon";
export const ANKI_ADDON_VERSION = "0.0.4";
export const ANKI_ADDON_URL = `https://github.com/bee-san/hachidori-anki/releases/download/v${ANKI_ADDON_VERSION}/${ANKI_ADDON_FILE_NAME}`;
export async function fetchAnkiAddon(request = globalThis.fetch) {
const response = await request(ANKI_ADDON_URL);
if (!response.ok) throw new Error(`GitHub returned HTTP ${response.status}. Try again.`);
return response.blob();
}