Skip to content
This repository has been archived by the owner on Jun 29, 2019. It is now read-only.

Commit

Permalink
Add clear query option
Browse files Browse the repository at this point in the history
  • Loading branch information
Heejin committed Apr 3, 2016
1 parent 9d0d794 commit 3958a0f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/main-es6/server/app/mainwindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const electron = require('electron');
const BrowserWindow = electron.BrowserWindow;

const platformUtil = require('../../../platform-util');
const pref = require('../pref');

let browserWindow = null;

Expand Down Expand Up @@ -78,7 +79,10 @@ function hideAndRefreshWindow(dontRestoreFocus) {
return;

browserWindow.hide();
browserWindow.webContents.executeJavaScript('refresh()');

const clearQuery = pref.get('clearQuery');
if (clearQuery)
browserWindow.webContents.executeJavaScript('clearQuery()');

if (!dontRestoreFocus) {
platformUtil.restoreFocus();
Expand Down
5 changes: 5 additions & 0 deletions app/main-es6/server/preferences/windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"title": "Quick-Open Shorcut",
"default": "alt+space"
},
"clearQuery": {
"type": "boolean",
"title": "Clear query after closing",
"default": true
},
"proxy": {
"type": "object",
"title": "Global Proxy Settings",
Expand Down

0 comments on commit 3958a0f

Please sign in to comment.