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