mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-24 22:22:50 -05:00
Prevent permission requests from web content
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import fs from 'fs'
|
||||
import yargs from 'yargs'
|
||||
import { app, shell, BrowserWindow } from 'electron'
|
||||
import { app, shell, session, BrowserWindow } from 'electron'
|
||||
|
||||
import { pollPublicData, pollSpreadsheetData, StreamIDGenerator } from './data'
|
||||
import StreamWindow from './StreamWindow'
|
||||
@@ -49,6 +49,13 @@ async function main() {
|
||||
})
|
||||
.help().argv
|
||||
|
||||
// Reject all permission requests from web content.
|
||||
session
|
||||
.fromPartition('persist:session')
|
||||
.setPermissionRequestHandler((webContents, permission, callback) => {
|
||||
callback(false)
|
||||
})
|
||||
|
||||
const idGen = new StreamIDGenerator()
|
||||
|
||||
const streamWindow = new StreamWindow()
|
||||
|
||||
Reference in New Issue
Block a user