mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-07 12:14:39 +00:00
separate thems into separate files
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { CustomTheme } from '../../../interface/types/CustomThemes';
|
||||
|
||||
|
||||
export const removeTheme = (theme: CustomTheme) => {
|
||||
// Remove custom CSS
|
||||
const styleElement = document.getElementById('custom-theme');
|
||||
if (styleElement) {
|
||||
styleElement.parentNode?.removeChild(styleElement);
|
||||
}
|
||||
|
||||
// Reset default color
|
||||
//browser.storage.local.set({ selectedColor: '' });
|
||||
// Remove custom images
|
||||
const customImageVariables = theme.CustomImages.map((image) => image.variableName);
|
||||
customImageVariables.forEach((variableName) => {
|
||||
document.documentElement.style.removeProperty('--' + variableName);
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user