Skip to content

Commit 9c25aab

Browse files
committed
Fix bad merge (3993 before 4021 broke things)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent 1d2bd68 commit 9c25aab

1 file changed

Lines changed: 0 additions & 41 deletions

File tree

‎electron_app/src/electron-main.js‎

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -46,47 +46,6 @@ const INITIAL_UPDATE_DELAY_MS = 30 * 1000;
4646
let mainWindow = null;
4747
let appQuitting = false;
4848

49-
function safeOpenURL(target) {
50-
// openExternal passes the target to open/start/xdg-open,
51-
// so put fairly stringent limits on what can be opened
52-
// (for instance, open /bin/sh does indeed open a terminal
53-
// with a shell, albeit with no arguments)
54-
const parsedUrl = url.parse(target);
55-
if (PERMITTED_URL_SCHEMES.indexOf(parsedUrl.protocol) > -1) {
56-
// explicitly use the URL re-assembled by the url library,
57-
// so we know the url parser has understood all the parts
58-
// of the input string
59-
const newTarget = url.format(parsedUrl);
60-
electron.shell.openExternal(newTarget);
61-
}
62-
}
63-
64-
function onWindowOrNavigate(ev, target) {
65-
// always prevent the default: if something goes wrong,
66-
// we don't want to end up opening it in the electron
67-
// app, as we could end up opening any sort of random
68-
// url in a window that has node scripting access.
69-
ev.preventDefault();
70-
safeOpenURL(target);
71-
}
72-
73-
function onLinkContextMenu(ev, params) {
74-
const popupMenu = new electron.Menu();
75-
76-
popupMenu.append(new electron.MenuItem({
77-
label: params.linkURL,
78-
click() { safeOpenURL(params.linkURL); },
79-
}));
80-
81-
popupMenu.append(new electron.MenuItem({
82-
label: 'Copy Link Address',
83-
click() { electron.clipboard.writeText(params.linkURL); },
84-
}));
85-
86-
popupMenu.popup();
87-
ev.preventDefault();
88-
}
89-
9049
function installUpdate() {
9150
// for some reason, quitAndInstall does not fire the
9251
// before-quit event, so we need to set the flag here.

0 commit comments

Comments
 (0)