mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 19:54:39 +00:00
removed unused code
This commit is contained in:
+1
-28
@@ -100,31 +100,4 @@ export const enableCurrentTheme = async () => {
|
||||
} else {
|
||||
console.log("No current theme set in localStorage.");
|
||||
}
|
||||
};
|
||||
|
||||
// 🚀 Main function to orchestrate everything 🚀
|
||||
/* export const EnableThemes = async () => {
|
||||
const availableThemes = [
|
||||
{ name: "dark", url: "https://raw.githubusercontent.com/SethBurkart123/BetterSEQTA-Themes/main/themes/test.json" }
|
||||
];
|
||||
|
||||
// Save available themes
|
||||
localStorage.setItem("availableThemes", JSON.stringify(availableThemes));
|
||||
|
||||
// Determine theme to apply
|
||||
const themeToApply = availableThemes[0].name;
|
||||
|
||||
// Fetch, save, and apply theme if not already in IndexedDB
|
||||
if (!(await themeExistsInDB(themeToApply))) {
|
||||
console.log(`Theme ${themeToApply} not found in IndexedDB, fetching...`);
|
||||
const themeData = await fetchThemeJSON(availableThemes[0].url);
|
||||
await saveToIndexedDB(themeData, themeToApply);
|
||||
console.log(`Theme ${themeToApply} saved to IndexedDB`, themeData);
|
||||
}
|
||||
|
||||
// Set and apply the selected theme
|
||||
localStorage.setItem("selectedTheme", themeToApply);
|
||||
await applyTheme(themeToApply).catch((error) => {
|
||||
console.error(`Failed to apply theme: ${error}`);
|
||||
});
|
||||
}; */
|
||||
};
|
||||
Reference in New Issue
Block a user