From 6c9787fea1fdd8bd5b717d29d282a074b7d75746 Mon Sep 17 00:00:00 2001 From: s2 Date: Wed, 13 Jan 2021 15:57:21 +0100 Subject: [PATCH] add homepage link --- app/js/index.js | 6 ++++++ app/templates/firstRun.ejs | 3 +++ 2 files changed, 9 insertions(+) diff --git a/app/js/index.js b/app/js/index.js index d57ec286..db72bb6d 100644 --- a/app/js/index.js +++ b/app/js/index.js @@ -3,6 +3,7 @@ const remote = require('electron').remote; const electronFind = require('electron-find'); const dialog = remote.require('electron').dialog; + const shell = require('electron').shell; let findInPage = new electronFind.FindInPage(remote.getCurrentWebContents()); @@ -144,6 +145,11 @@ }); }); + $(document).on('click', 'a[href^="http"]', function(event) { + event.preventDefault(); + shell.openExternal(this.href); + }); + $(document).on('keypress', (ev) => { //ctrl + f if (ev.ctrlKey && ev.charCode == 6) { diff --git a/app/templates/firstRun.ejs b/app/templates/firstRun.ejs index 8649b520..5cac27ba 100644 --- a/app/templates/firstRun.ejs +++ b/app/templates/firstRun.ejs @@ -6,4 +6,7 @@ Open git repository folder +

+ Homepage +