mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-31 09:22:49 -05:00
Wrap injected JS in IIFE to prevent scope conflicts
This commit is contained in:
@@ -221,6 +221,7 @@ const viewStateMachine = Machine(
|
||||
}
|
||||
const wc = view.webContents
|
||||
const info = await wc.executeJavaScript(`
|
||||
(function() {
|
||||
const sleep = ms => new Promise((resolve) => setTimeout(resolve, ms))
|
||||
|
||||
async function waitForVideo() {
|
||||
@@ -336,6 +337,7 @@ const viewStateMachine = Machine(
|
||||
return info
|
||||
}
|
||||
findVideo()
|
||||
}())
|
||||
`)
|
||||
return info
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user