IYUUPlus-Windows/preload.js

14 lines
524 B
JavaScript
Raw Permalink Normal View History

2024-06-27 17:29:25 +08:00
window.addEventListener('DOMContentLoaded', () => {
2024-07-02 16:26:48 +08:00
const script = document.createElement('script');
script.defer = true;
script.src = 'https://analytics.lifebus.top/script.js';
script.setAttribute('data-website-id', '5ca63d47-0739-4059-a480-40e7edf80ff9');
document.head.appendChild(script);
2024-07-03 18:35:02 +08:00
});
const { contextBridge, ipcRenderer } = require('electron');
contextBridge.exposeInMainWorld('electron', {
onDisplayLog: (callback) => ipcRenderer.on('display-log', (event, data) => callback(data))
2024-07-02 16:26:48 +08:00
});