mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-13 02:14:23 +01:00
21 lines
No EOL
553 B
TypeScript
21 lines
No EOL
553 B
TypeScript
import { localizeHtmlPage } from "./maze-utils/setup";
|
|
import Config from "./config";
|
|
import { showDonationLink } from "./utils/configUtils";
|
|
|
|
import { waitFor } from "./maze-utils";
|
|
|
|
window.addEventListener('DOMContentLoaded', init);
|
|
|
|
async function init() {
|
|
localizeHtmlPage();
|
|
|
|
await waitFor(() => Config.config !== null);
|
|
|
|
if (!Config.config.darkMode) {
|
|
document.documentElement.setAttribute("data-theme", "light");
|
|
}
|
|
|
|
if (!showDonationLink()) {
|
|
document.getElementById("sbDonate").style.display = "none";
|
|
}
|
|
} |