anki/ts/reviewer/reviewer_extras.ts
Abdo dc3bd3efde
Replace css_browser_selector with our own implementation (#2854)
* Replace css_browser_selector

* Add classes to root element instead of body

* Export addBrowserClasses() in reviewer_extras for mobile clients (dae)

* Avoid setting .mac on iOS devices (dae)
2023-11-30 10:57:33 +10:00

21 lines
827 B
TypeScript

// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
/* eslint
@typescript-eslint/no-explicit-any: "off",
*/
// A standalone bundle that adds mutateNextCardStates and the image occlusion API
// to the anki namespace. When all clients are using reviewer.js directly, we
// can get rid of this.
import { imageOcclusionAPI } from "../image-occlusion/review";
import { mutateNextCardStates } from "./answering";
import { addBrowserClasses } from "./browser_selector";
globalThis.anki = globalThis.anki || {};
globalThis.anki.mutateNextCardStates = mutateNextCardStates;
globalThis.anki.imageOcclusion = imageOcclusionAPI;
globalThis.anki.setupImageCloze = imageOcclusionAPI.setup; // deprecated
globalThis.anki.addBrowserClasses = addBrowserClasses;