mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-07 12:14:39 +00:00
save selectedColor for non-destructive theme viewing
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { CustomTheme } from '../../../interface/types/CustomThemes';
|
||||
import browser from 'webextension-polyfill';
|
||||
|
||||
|
||||
export const removeTheme = (theme: CustomTheme) => {
|
||||
export const removeTheme = async (theme: CustomTheme) => {
|
||||
// Remove custom CSS
|
||||
const styleElement = document.getElementById('custom-theme');
|
||||
if (styleElement) {
|
||||
@@ -9,7 +9,9 @@ export const removeTheme = (theme: CustomTheme) => {
|
||||
}
|
||||
|
||||
// Reset default color
|
||||
//browser.storage.local.set({ selectedColor: '' });
|
||||
const originalSelectedColor = await browser.storage.local.get('originalSelectedColor') as { originalSelectedColor: string; };
|
||||
await browser.storage.local.set({ selectedColor: originalSelectedColor.originalSelectedColor });
|
||||
|
||||
// Remove custom images
|
||||
const customImageVariables = theme.CustomImages.map((image) => image.variableName);
|
||||
customImageVariables.forEach((variableName) => {
|
||||
|
||||
Reference in New Issue
Block a user