mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 04:57:09 +03:00
21 lines
523 B
TypeScript
21 lines
523 B
TypeScript
import Config from "./config";
|
|
import { showDonationLink } from "./utils/configUtils";
|
|
|
|
import Utils from "./utils";
|
|
const utils = new Utils();
|
|
|
|
window.addEventListener('DOMContentLoaded', init);
|
|
|
|
async function init() {
|
|
utils.localizeHtmlPage();
|
|
|
|
await utils.wait(() => Config.config !== null);
|
|
|
|
if (!Config.config.darkMode) {
|
|
document.documentElement.setAttribute("data-theme", "light");
|
|
}
|
|
|
|
if (!showDonationLink()) {
|
|
document.getElementById("sbDonate").style.display = "none";
|
|
}
|
|
} |