add editing functionality

This commit is contained in:
SethBurkart123
2024-04-04 10:16:02 +11:00
parent 144addc7d4
commit 0abd8dadab
6 changed files with 132 additions and 33 deletions
+3 -2
View File
@@ -2,15 +2,16 @@ import browser from "webextension-polyfill";
/**
* Open the Theme Creator sidebar, it is an embedded page loaded similar to the extension popup
* @param themeID - The ID of the theme to load in the Theme Creator
* @returns void
*/
export function OpenThemeCreator() {
export function OpenThemeCreator( themeID: string = '' ) {
CloseThemeCreator();
const width = '310px';
const themeCreatorIframe: HTMLIFrameElement = document.createElement('iframe');
themeCreatorIframe.src = `${browser.runtime.getURL('src/interface/index.html')}#themeCreator`;
themeCreatorIframe.src = `${browser.runtime.getURL('src/interface/index.html')}${ themeID != '' ? `?themeID=${themeID}` : '' }#themeCreator`;
themeCreatorIframe.id = 'themeCreatorIframe';
themeCreatorIframe.setAttribute('allowTransparency', 'true');
themeCreatorIframe.setAttribute('excludeDarkCheck', 'true');