Browse Source

block permission and popup requests

master
sose 3 months ago
parent
commit
e0a567a89f
  1. 11
      hellgate.js

11
hellgate.js

@ -55,7 +55,16 @@ async function handle_request(request, response) {
var page_sigil
var data = ""
var available_sigils = fs.readdirSync(sigils_dir)
win.webContents.session.setPermissionRequestHandler((webContents, permission, callback) => {
return callback(false)
})
win.webContents.setWindowOpenHandler(() => {
console.log("Blocked a popup request")
return {action: 'deny'}
})
console.log(`Got request for "${target_url}"`)
await Promise.race([

Loading…
Cancel
Save