1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-02 20:30:05 +02:00

add homepage link

This commit is contained in:
s2
2021-01-13 15:57:21 +01:00
parent 16138409f9
commit 6c9787fea1
2 changed files with 9 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
const remote = require('electron').remote; const remote = require('electron').remote;
const electronFind = require('electron-find'); const electronFind = require('electron-find');
const dialog = remote.require('electron').dialog; const dialog = remote.require('electron').dialog;
const shell = require('electron').shell;
let findInPage = new electronFind.FindInPage(remote.getCurrentWebContents()); 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) => { $(document).on('keypress', (ev) => {
//ctrl + f //ctrl + f
if (ev.ctrlKey && ev.charCode == 6) { if (ev.ctrlKey && ev.charCode == 6) {

View File

@@ -6,4 +6,7 @@
<a class="btn btn-primary btn-lg js-open-folder" href="javascript:///">Open git repository folder</a> <a class="btn btn-primary btn-lg js-open-folder" href="javascript:///">Open git repository folder</a>
<input type="file" style="display: none" class="js-open-folder-input" webkitdirectory /> <input type="file" style="display: none" class="js-open-folder-input" webkitdirectory />
</div> </div>
<p>
<a href="https://github.com/S2-/gitlit">Homepage</a>
</p>
</div> </div>