mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-01-25 06:29:08 -06:00
added dev tools to global menu
This commit is contained in:
@@ -94,13 +94,18 @@ function registerEntrypoints() {
|
||||
|
||||
utils.bindShortcut('ctrl+r', utils.reloadApp);
|
||||
|
||||
utils.bindShortcut('ctrl+shift+i', () => {
|
||||
if (utils.isElectron()) {
|
||||
$("#open-dev-tools-button").toggle(utils.isElectron());
|
||||
|
||||
if (utils.isElectron()) {
|
||||
const openDevTools = () => {
|
||||
require('electron').remote.getCurrentWindow().toggleDevTools();
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
utils.bindShortcut('ctrl+shift+i', openDevTools);
|
||||
$("#open-dev-tools-button").click(openDevTools);
|
||||
}
|
||||
|
||||
function openInPageSearch() {
|
||||
if (utils.isElectron()) {
|
||||
|
||||
@@ -45,7 +45,7 @@ function now() {
|
||||
}
|
||||
|
||||
function isElectron() {
|
||||
return window && window.process && window.process.type;
|
||||
return !!(window && window.process && window.process.type);
|
||||
}
|
||||
|
||||
function isMac() {
|
||||
|
||||
Reference in New Issue
Block a user