A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: open external links in default browser (fixes streetwriters/notesnook#248)
thecodrrd0967de3ec42
diff --git a/apps/web/desktop/electron.js b/apps/web/desktop/electron.jsindex e4239e0db..cf23f5d96 100644--- a/apps/web/desktop/electron.js+++ b/apps/web/desktop/electron.js@@ -1,4 +1,4 @@-const { app, BrowserWindow, nativeTheme } = require("electron");+const { app, BrowserWindow, nativeTheme, shell } = require("electron");const path = require("path");const os = require("os");const { isDevelopment } = require("./utils");@@ -42,7 +42,7 @@ async function createWindow() {nodeIntegration: false, //true,enableRemoteModule: false,contextIsolation: true,- nativeWindowOpen: true,+ nativeWindowOpen: false,spellcheck: false,preload: __dirname + "/preload.js",},@@ -65,6 +65,14 @@ async function createWindow() {global.win = null;});+ mainWindow.webContents.setWindowOpenHandler((details) => {+ if (details.frameName === "_blank") {+ shell.openExternal(details.url);+ return { action: "deny" };+ }+ return { action: "allow" };+ });+nativeTheme.on("updated", () => {if (getTheme() === "system") {sendMessageToRenderer(EVENTS.themeChanged, {