Adding settings to control which schemes simple browser is enabled for

Also adds a setting to enable/disable the focus lock indicator
This commit is contained in:
Matt Bierner
2021-01-05 21:58:59 -08:00
parent ba67d1bea4
commit 2fed7ba374
9 changed files with 130 additions and 44 deletions

View File

@@ -37,6 +37,11 @@ window.addEventListener('message', e => {
iframe.focus();
break;
}
case 'didChangeFocusLockIndicatorEnabled':
{
toggleFocusLockIndicatorEnabled(e.data.enabled);
break;
}
}
});
@@ -79,8 +84,14 @@ onceDocumentLoaded(() => {
});
navigateTo(settings.url);
toggleFocusLockIndicatorEnabled(settings.focusLockIndicatorEnabled);
function navigateTo(url: string): void {
iframe.src = url;
}
});
function toggleFocusLockIndicatorEnabled(enabled: boolean) {
document.body.classList.toggle('enable-focus-lock-indicator', enabled);
}