added search for electron + sourcemap for jquery

This commit is contained in:
azivner
2017-12-12 21:40:55 -05:00
parent bdeaa2829d
commit c24d9a0afa
8 changed files with 75 additions and 1 deletions

View File

@@ -43,6 +43,20 @@ $(document).bind('keydown', 'ctrl+shift+i', () => {
}
});
$(document).bind('keydown', 'ctrl+f', () => {
if (isElectron()) {
const searchInPage = require('electron-in-page-search').default;
const remote = require('electron').remote;
const inPageSearch = searchInPage(remote.getCurrentWebContents(), { openDevToolsOfSearchWindow: true });
inPageSearch.openSearchWindow();
return false;
}
});
$(window).on('beforeunload', () => {
// this makes sure that when user e.g. reloads the page or navigates away from the page, the note's content is saved
// this sends the request asynchronously and doesn't wait for result