mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-11 17:35:46 +00:00
Disable unused Chromium plugins; delete old commented PDF code.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -87,7 +87,6 @@ function createMainWindow(): Electron.BrowserWindow {
|
|||||||
minWidth: 500,
|
minWidth: 500,
|
||||||
minHeight: 400,
|
minHeight: 400,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
plugins: true,
|
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
partition: 'persist:webviewsession',
|
partition: 'persist:webviewsession',
|
||||||
webviewTag: true
|
webviewTag: true
|
||||||
@@ -285,32 +284,6 @@ ${error}`
|
|||||||
app.quit();
|
app.quit();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Code to show pdf in a new BrowserWindow (currently commented out due to bug-upstream)
|
|
||||||
// ipcMain.on('pdf-view', (event, url) => {
|
|
||||||
// // Paddings for pdfWindow so that it fits into the main browserWindow
|
|
||||||
// const paddingWidth = 55;
|
|
||||||
// const paddingHeight = 22;
|
|
||||||
|
|
||||||
// // Get the config of main browserWindow
|
|
||||||
// const mainWindowState = global.mainWindowState;
|
|
||||||
|
|
||||||
// // Window to view the pdf file
|
|
||||||
// const pdfWindow = new electron.BrowserWindow({
|
|
||||||
// x: mainWindowState.x + paddingWidth,
|
|
||||||
// y: mainWindowState.y + paddingHeight,
|
|
||||||
// width: mainWindowState.width - paddingWidth,
|
|
||||||
// height: mainWindowState.height - paddingHeight,
|
|
||||||
// webPreferences: {
|
|
||||||
// plugins: true,
|
|
||||||
// partition: 'persist:webviewsession'
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// pdfWindow.loadURL(url);
|
|
||||||
|
|
||||||
// // We don't want to have the menu bar in pdf window
|
|
||||||
// pdfWindow.setMenu(null);
|
|
||||||
// });
|
|
||||||
|
|
||||||
// Reload full app not just webview, useful in debugging
|
// Reload full app not just webview, useful in debugging
|
||||||
ipcMain.on('reload-full-app', () => {
|
ipcMain.on('reload-full-app', () => {
|
||||||
mainWindow.reload();
|
mainWindow.reload();
|
||||||
|
|||||||
Reference in New Issue
Block a user