mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-31 13:39:58 +01:00
only register open-url handler on macos
This commit is contained in:
parent
dd45008291
commit
4b8b32c3e5
@ -34,14 +34,14 @@ module.exports = () => {
|
|||||||
app.setAsDefaultProtocolClient('riot', process.execPath, [app.getAppPath(), ...args]);
|
app.setAsDefaultProtocolClient('riot', process.execPath, [app.getAppPath(), ...args]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Protocol handler for macos
|
if (process.platform === 'darwin') {
|
||||||
app.on('open-url', function(ev, url) {
|
// Protocol handler for macos
|
||||||
ev.preventDefault();
|
app.on('open-url', function(ev, url) {
|
||||||
processUrl(url);
|
ev.preventDefault();
|
||||||
});
|
processUrl(url);
|
||||||
|
});
|
||||||
// Protocol handler for win32/Linux
|
} else {
|
||||||
if (process.platform !== 'darwin') {
|
// Protocol handler for win32/Linux
|
||||||
app.on('second-instance', (ev, commandLine) => {
|
app.on('second-instance', (ev, commandLine) => {
|
||||||
const url = commandLine[commandLine.length - 1];
|
const url = commandLine[commandLine.length - 1];
|
||||||
if (!url.startsWith("riot://")) return;
|
if (!url.startsWith("riot://")) return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user