move shared array warning to same location as gdpr

This commit is contained in:
Stewart Allen 2023-03-12 12:22:35 -04:00
commit 43d66d43e7

View file

@ -1517,12 +1517,7 @@ gapp.register("kiri.init", [], (root, exports) => {
// MAIN INITIALIZATION FUNCTION
function init_one() {
let { event, conf, view, show, feature } = api;
if (feature.work_alerts && !window.SharedArrayBuffer) {
api.alerts.show("The security context of this", 10);
api.alerts.show("window blocks important functionality", 10);
}
let { event, conf, view, show } = api;
event.emit('init.one');
@ -2771,6 +2766,12 @@ gapp.register("kiri.init", [], (root, exports) => {
$('gdpr').style.display = 'flex';
}
// warn of degraded functionality when SharedArrayBuffers are missing
if (api.feature.work_alerts && !window.SharedArrayBuffer) {
api.alerts.show("The security context of this", 10);
api.alerts.show("window blocks important functionality", 10);
}
// add keyboard focus handler (must use for iframes)
WIN.addEventListener('load', function () {
WIN.focus();