mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/lyswhut/lx-music-desktop.git
synced 2026-09-20 08:04:00 +08:00
优化
This commit is contained in:
@@ -314,6 +314,18 @@ window.addEventListener('unhandledrejection', (event) => {
|
||||
const message = typeof event.reason === 'string' ? event.reason : event.reason?.message ?? String(event.reason)
|
||||
globalThis.__lx_init_error_handler__.sendError(message.replace(/^Error:\\s/, ''))
|
||||
})
|
||||
Object.defineProperty(window.document, 'getElementsByTagName', {
|
||||
value: (name) => {
|
||||
if (name == 'script') {
|
||||
return [
|
||||
Object.freeze({
|
||||
innerText: lx.currentScriptInfo.rawScript,
|
||||
}),
|
||||
]
|
||||
}
|
||||
return null
|
||||
}
|
||||
})
|
||||
})()`)
|
||||
|
||||
webFrame.executeJavaScript(userApi.script).catch(_ => _)
|
||||
|
||||
Reference in New Issue
Block a user