remove some unused code, add devtools shortcut

master
Drake 3 years ago
parent fbe412bcb8
commit 1b87527276
No known key found for this signature in database
GPG Key ID: 9B83455BD94F12A3

@ -0,0 +1,2 @@
# drakecord
Discord: Drake Edition

@ -2,12 +2,6 @@ const { app, BrowserWindow, webContents, session } = require('electron');
const fetch = require('node-fetch');
const Path = require('path')
const fetchCumcord = async () => {
const response = await fetch("https://cors.bridged.cc/https://raw.githubusercontent.com/Cumcord/Cumcord/stable/dist/build.js");
const text = await response.text()
return text;
}
function createWindow() {
const win = new BrowserWindow({
width: 800,
@ -16,13 +10,16 @@ function createWindow() {
});
win.removeMenu();
win.loadFile("index.html")
//win.loadURL('https://discord.com/app')
win.webContents.openDevTools()
win.webContents.on('before-input-event', (event, input) => {
if (input.control && input.shift && input.key.toLowerCase() === 'i') {
win.webContents.openDevTools()
}
});
let ses = win.webContents.session;
ses.webRequest.onHeadersReceived(({ responseHeaders, url }, done) => {
delete responseHeaders['content-security-policy'];
done({responseHeaders});
})
});
ses.loadExtension(Path.join(__dirname, 'CCExt'));
return win;
}

Loading…
Cancel
Save