diff --git a/src/templates.ts b/src/templates.ts index 5dddad25c8..862d74fef9 100644 --- a/src/templates.ts +++ b/src/templates.ts @@ -21,6 +21,7 @@ export const SHOW_ME_TEMPLATES: Templates = { Notification: 'Notification', PowerMonitor: 'PowerMonitor', PowerSaveBlocker: 'PowerSaveBlocker', + Protocol: 'Protocol', Screen: 'Screen', Session: 'Session', Shell: 'Shell', diff --git a/static/show-me/protocol/main.js b/static/show-me/protocol/main.js new file mode 100644 index 0000000000..3f89c74f06 --- /dev/null +++ b/static/show-me/protocol/main.js @@ -0,0 +1,17 @@ +// Register and handle custom protocol +// +// For more info, see: +// https://www.electronjs.org/docs/latest/api/protocol + +const { app, BrowserWindow, protocol } = require('electron') + +app.whenReady().then(() => { + protocol.handle('some-protocol', () => { + return new Response( + Buffer.from('