add theme creator iframe

This commit is contained in:
SethBurkart123
2024-03-31 08:27:43 +11:00
parent e095e7a7c5
commit 96571b111f
4 changed files with 36 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
import browser from "webextension-polyfill";
import popup from '../../interface/index.html?url'
/**
* Open the Theme Creator sidebar, it is an embedded page loaded similar to the extension popup
*/
export function OpenThemeCreator() {
const container = document.querySelector('#container')
const themeCreatorIframe: HTMLIFrameElement = document.createElement('iframe')
themeCreatorIframe.src = `${browser.runtime.getURL(popup)}#themeCreator`
themeCreatorIframe.id = 'themeCreatorIframe'
themeCreatorIframe.setAttribute('allowTransparency', 'true')
themeCreatorIframe.setAttribute('excludeDarkCheck', 'true')
themeCreatorIframe.style.border = 'none'
container!.appendChild(themeCreatorIframe)
}