mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 11:44:40 +00:00
fix: themecreator relocating UI
This commit is contained in:
@@ -3,14 +3,21 @@ import popup from '../../interface/index.html?url'
|
||||
|
||||
/**
|
||||
* Open the Theme Creator sidebar, it is an embedded page loaded similar to the extension popup
|
||||
* @returns void
|
||||
*/
|
||||
export function OpenThemeCreator() {
|
||||
const container = document.querySelector('#container')
|
||||
const width = '300px'
|
||||
|
||||
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.width = width
|
||||
themeCreatorIframe.style.border = 'none'
|
||||
container!.appendChild(themeCreatorIframe)
|
||||
|
||||
const mainContent = document.querySelector('#container') as HTMLDivElement
|
||||
if (mainContent) mainContent.style.width = `calc(100% - ${width})`
|
||||
|
||||
document.body.appendChild(themeCreatorIframe)
|
||||
}
|
||||
Reference in New Issue
Block a user