Commit 85f1d840 authored by Andreas Heimann's avatar Andreas Heimann

added custom protocol

parent f516a543
const { app, BrowserWindow } = require('electron');
const { app, BrowserWindow, protocol } = require('electron');
const PROTOCOL_PREFIX = "csinstall";
app.setAsDefaultProtocolClient(PROTOCOL_PREFIX);
function createWindow () {
const win = new BrowserWindow({
......@@ -15,6 +18,11 @@ function createWindow () {
win.webContents.openDevTools();
win.setMenuBarVisibility(false);
protocol.registerHttpProtocol(PROTOCOL_PREFIX, (req, cb) => {
const fullUrl = formFullTodoUrl(req.url);
console.log(fullUrl);
});
}
app.whenReady().then(createWindow);
......
......@@ -6,6 +6,11 @@
"scripts": {
"start": "electron ."
},
"protocols": [{
"name": "customspeens",
"role": "CustomSpeens",
"schemes": ["csinstall"]
}],
"author": "Andreas Heimann",
"license": "MIT",
"devDependencies": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment