13const builtinThemes = ["light", "dark", "ayu"];
14const darkThemes = ["dark", "ayu"];
15▶window.currentTheme = (function() {
16 const currentTheme = document.getElementById("themeStyle");
17 return currentTheme instanceof HTMLLinkElement ? currentTheme : null;
· · ·
18})();
19
20▶const settingsDataset = (function() {
21 const settingsElement = document.getElementById("default-settings");
22 return settingsElement && settingsElement.dataset ? settingsElement.dataset : null;
· · ·
37// used in other files, not yet used in this one.
38// eslint-disable-next-line no-unused-vars
39▶function nonnull(x, msg) {
40 if (x === null) {
41 throw (msg || "unexpected null value!");
· · ·
59// used in other files, not yet used in this one.
60// eslint-disable-next-line no-unused-vars
61▶function nonundef(x, msg) {
62 if (x === undefined) {
63 throw (msg || "unexpected null value!");
· · ·
73 * @returns
74 */
75▶function getSettingValue(settingName) {
76 const current = getCurrentValue(settingName);
77 if (current === null && settingsDataset !== null) {
+ 25 more matches in this file