mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
refac: improve multi browser support
This commit is contained in:
@@ -8,6 +8,6 @@ export async function appendBackgroundToUI() {
|
||||
background.id = 'background';
|
||||
background.classList.add('imageBackground');
|
||||
background.setAttribute('excludeDarkCheck', 'true');
|
||||
background.src = browser.runtime.getURL('src/seqta/ui/background/background.html');
|
||||
background.src = browser.runtime.getURL('seqta/ui/background/background.html');
|
||||
parent!.appendChild(background);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ export function OpenThemeCreator( themeID: string = '' ) {
|
||||
const width = '310px';
|
||||
|
||||
const themeCreatorIframe: HTMLIFrameElement = document.createElement('iframe');
|
||||
themeCreatorIframe.src = `${browser.runtime.getURL('src/interface/index.html')}${ themeID != '' ? `?themeID=${themeID}` : '' }#themeCreator`;
|
||||
themeCreatorIframe.src = `${browser.runtime.getURL('interface/index.html')}${ themeID != '' ? `?themeID=${themeID}` : '' }#themeCreator`;
|
||||
themeCreatorIframe.id = 'themeCreatorIframe';
|
||||
themeCreatorIframe.setAttribute('allowTransparency', 'true');
|
||||
themeCreatorIframe.setAttribute('excludeDarkCheck', 'true');
|
||||
|
||||
@@ -93,7 +93,7 @@ class StorageManager {
|
||||
/**
|
||||
* Register a listener for a setting.
|
||||
* @param prop The setting to listen to.
|
||||
* @param listener The listener to call when the setting changes.
|
||||
* @param listener The listener to call when the setting changes -> takes two arguments, (newValue, oldValue)
|
||||
*/
|
||||
public register(prop: keyof SettingsState, listener: ChangeListener): void {
|
||||
if (!this.listeners[prop]) {
|
||||
|
||||
@@ -36,7 +36,8 @@ export class StorageChangeHandler {
|
||||
updateAllColors();
|
||||
}
|
||||
|
||||
private handleOnOffChange() {
|
||||
private handleOnOffChange(newValue: boolean) {
|
||||
if (newValue) return;
|
||||
browser.runtime.sendMessage({ type: 'reloadTabs' });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user