Context isolation for About, ScreenShare, Preferences

This commit is contained in:
Josh Perez 2021-09-16 11:52:56 -04:00 committed by GitHub
parent 59ca63cd2e
commit 43685d15c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 234 additions and 321 deletions

View file

@ -1,30 +0,0 @@
// Copyright 2018-2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
/* global $: false */
// Add version
$('.version').text(`v${window.getVersion()}`);
// Add debugging metadata - environment if not production, app instance name
const states = [];
if (window.getEnvironment() !== 'production') {
states.push(window.getEnvironment());
}
if (window.getAppInstance()) {
states.push(window.getAppInstance());
}
$('.environment').text(states.join(' - '));
// Install the 'dismiss with escape key' handler
$(document).on('keydown', e => {
if (e.keyCode === 27) {
window.closeAbout();
}
});
// Localize the acknowledgment and privacy strings
$('.acknowledgments').text(window.i18n('softwareAcknowledgments'));
$('.privacy').text(window.i18n('privacyPolicy'));