0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2025-04-02 23:33:45 +03:00
yandex-music-linux/patches/0003-Expose-Dev-Tools-In-Main-World.patch
2025-01-27 09:36:26 +03:00

13 lines
627 B
Diff

diff --git a/main/lib/preload.js b/main/lib/preload.js
--- a/main/lib/preload.js
+++ b/main/lib/preload.js
@@ -25,6 +25,8 @@ electron_1.contextBridge.exposeInMainWorld('desktopEvents', {
return electron_1.ipcRenderer.invoke(name, ...args);
}
});
+const devTools = process.env.DEV_TOOLS && process.env.DEV_TOOLS > 0;
+electron_1.contextBridge.exposeInMainWorld('IS_DEVTOOLS_ENABLED', devTools);
window.document.addEventListener('DOMContentLoaded', () => {
const theme = (0, getInitialTheme_js_1.getInitialTheme)();
if (hostnamePatterns_js_1.applicationHostnamePattern.test(window.location.hostname)) {