-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelectronEvents.js
37 lines (27 loc) · 1.12 KB
/
electronEvents.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const { clipboard } = require('electron')
const username = require("os").userInfo().username
// clipboard.writeText('hello i am a bit of text!')
// function PasteElectron(){
// const text = clipboard.readText()
// console.log(text)
// }
// const { contextBridge, ipcRenderer } = require('electron');
// // var Data = {message: "Looking at their library", message2: ""};
// // ipcRenderer.send('request-mainprocess-action', Data);
// const API = {
// sendMsg: function(msg) {
// ipcRenderer.send('request-mainprocess-action', {message: msg[0], message2: msg[1]})
// }
// };
// contextBridge.exposeToMainWorld("api", API);
// updateDiscordRichPresence("bruh", "whyyy");
// const { contextBridge, ipcRenderer } = require("electron");
// contextBridge.exposeInMainWorld("api", API);
var isApp = true
window.addEventListener("load", function(){
console.log(username)
console.log("hiiii")
var electronStyle = this.document.createElement("style")
electronStyle.innerText = "header{-webkit-app-region: drag;padding-right: 140px} header *{-webkit-app-region: no-drag;}"
this.document.head.appendChild(electronStyle)
})